]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/pw_user.c
Fix a typo that prevented pw(8) from setting a user's UID to 0.
[pw-darwin.git] / 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)