Fix a typo that prevented pw(8) from setting a user's UID to 0.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
markj 2016-03-02 04:56:36 +00:00
parent 284e753ba9
commit 87175eabd7

View File

@ -1654,7 +1654,7 @@ pw_user_mod(int argc, char **argv, char *arg1)
}
}
if (id > 0 && pwd->pw_uid != id) {
if (id >= 0 && pwd->pw_uid != id) {
pwd->pw_uid = id;
edited = true;
if (pwd->pw_uid != 0 && strcmp(pwd->pw_name, "root") == 0)