In case of the deletion of a user those whole database has to be regenerated,
otherwise the user planned to be deleted remain in the pwd.db while removed from the plain text password file.
This commit is contained in:
parent
dc0f2b4217
commit
0083d61abc
@ -146,7 +146,11 @@ pw_update(struct passwd * pwd, char const * user)
|
||||
pw_fini();
|
||||
err(1, "pw_copy()");
|
||||
}
|
||||
if (pw_mkdb(user) == -1) {
|
||||
/*
|
||||
* in case of deletion of a user, the whole database
|
||||
* needs to be regenerated
|
||||
*/
|
||||
if (pw_mkdb(pw != NULL ? user : NULL) == -1) {
|
||||
pw_fini();
|
||||
err(1, "pw_mkdb()");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user