]> git.cameronkatri.com Git - pw-darwin.git/commitdiff
Fix a typo that prevented pw(8) from setting a user's UID to 0.
authorMark Johnston <markj@FreeBSD.org>
Wed, 2 Mar 2016 04:56:36 +0000 (04:56 +0000)
committerMark Johnston <markj@FreeBSD.org>
Wed, 2 Mar 2016 04:56:36 +0000 (04:56 +0000)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

pw/pw_user.c

index 30a2749ec917ed191414ca3d5e1f6d369cc71792..2f87b56af6c093725525d815c4b7b1726f1d4271 100644 (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)