From b425ee4eb7a753abfc2517ea45f821748ab792ec Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin <bapt@FreeBSD.org> Date: Fri, 20 Jun 2014 10:38:08 +0000 Subject: [PATCH] Fix changing the username PR: 189172 Submitted by: fullermd@over-yonder.net MFC after: 1 week --- usr.sbin/pw/pwupd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pw/pwupd.c b/usr.sbin/pw/pwupd.c index 735f3855748b..c2a9a535ec45 100644 --- a/usr.sbin/pw/pwupd.c +++ b/usr.sbin/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()"); }