Fix changing the username

PR:		189172
Submitted by:	fullermd@over-yonder.net
MFC after:	1 week
This commit is contained in:
Baptiste Daroussin 2014-06-20 10:38:08 +00:00
parent 113f96dd0b
commit b425ee4eb7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267670

View File

@ -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()");
}