summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2016-03-02 04:56:36 +0000
committerMark Johnston <markj@FreeBSD.org>2016-03-02 04:56:36 +0000
commit569b82607b8f879fbb76b62bba9af20a310a7cc1 (patch)
treed0b591cae32843d013b871fcb731f6f8ae245a57
parenta05d621a3b9a8e41b02c61a781b9d6390d6d30ec (diff)
downloadpw-darwin-569b82607b8f879fbb76b62bba9af20a310a7cc1.tar.gz
pw-darwin-569b82607b8f879fbb76b62bba9af20a310a7cc1.tar.zst
pw-darwin-569b82607b8f879fbb76b62bba9af20a310a7cc1.zip
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
-rw-r--r--pw/pw_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 30a2749..2f87b56 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -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)