summaryrefslogtreecommitdiffstats
path: root/pw
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-06-20 10:38:08 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-06-20 10:38:08 +0000
commit9acd20af22bc708251d15272f413578c3fb5af87 (patch)
tree9eea40832f395d1f0a66422105b69d148108998b /pw
parentee785f41fafdd8449a5f9bdcf1774c22c4590ad5 (diff)
downloadpw-darwin-9acd20af22bc708251d15272f413578c3fb5af87.tar.gz
pw-darwin-9acd20af22bc708251d15272f413578c3fb5af87.tar.zst
pw-darwin-9acd20af22bc708251d15272f413578c3fb5af87.zip
Fix changing the username
PR: 189172 Submitted by: fullermd@over-yonder.net MFC after: 1 week
Diffstat (limited to 'pw')
-rw-r--r--pw/pwupd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pwupd.c b/pw/pwupd.c
index 735f385..c2a9a53 100644
--- a/pw/pwupd.c
+++ b/pw/pwupd.c
@@ -139,7 +139,7 @@ pw_update(struct passwd * pwd, char const * user)
* in case of deletion of a user, the whole database
* needs to be regenerated
*/
- if (pw_mkdb(pw != NULL ? user : NULL) == -1) {
+ if (pw_mkdb(pw != NULL ? pw->pw_name : NULL) == -1) {
pw_fini();
err(1, "pw_mkdb()");
}