summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Nugent <davidn@FreeBSD.org>2000-06-06 07:33:00 +0000
committerDavid Nugent <davidn@FreeBSD.org>2000-06-06 07:33:00 +0000
commit12a360af7578168a68cb173f523d637bab4609ce (patch)
treec881961f1877df033bcd93255a4efa18dfe379c3
parent3786ccae1e978cf7d1dba12e1219a48a6bb261c2 (diff)
downloadpw-darwin-12a360af7578168a68cb173f523d637bab4609ce.tar.gz
pw-darwin-12a360af7578168a68cb173f523d637bab4609ce.tar.zst
pw-darwin-12a360af7578168a68cb173f523d637bab4609ce.zip
Fix db syncronization when username is changed with -l under usermod.
pw(8) was calling pwd_mkdb -u oldusername instead of newusername, so the update appears to have failed until the next full pwd_mkdb syncronization. PR: bin/16418
-rw-r--r--pw/pwupd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pwupd.c b/pw/pwupd.c
index fea551c..7b96035 100644
--- a/pw/pwupd.c
+++ b/pw/pwupd.c
@@ -175,7 +175,7 @@ pw_update(struct passwd * pwd, char const * user, int mode)
if (mode == UPD_DELETE)
rc = pwdb(NULL);
else
- rc = pwdb("-u", user, NULL);
+ rc = pwdb("-u", pwd->pw_name, NULL);
}
}
}