summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw
diff options
context:
space:
mode:
authordavidn <davidn@FreeBSD.org>2000-06-06 07:33:00 +0000
committerdavidn <davidn@FreeBSD.org>2000-06-06 07:33:00 +0000
commitbb7748876180cf99bd9f53d40ab982a81d3d4944 (patch)
treeb1c132a65de34674c1151ea7caa881eabdbb34a4 /usr.sbin/pw
parent524d64647757f79f33759a99a815c5085b98c7dd (diff)
downloadFreeBSD-src-bb7748876180cf99bd9f53d40ab982a81d3d4944.zip
FreeBSD-src-bb7748876180cf99bd9f53d40ab982a81d3d4944.tar.gz
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
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r--usr.sbin/pw/pwupd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c
index fea551c..7b96035 100644
--- a/usr.sbin/pw/pwupd.c
+++ b/usr.sbin/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);
}
}
}
OpenPOWER on IntegriCloud