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:
Mark Johnston 2016-03-02 04:56:36 +00:00
parent 39dade169b
commit 429008a9ca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296300

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)