diff options
author | Mark Johnston <markj@FreeBSD.org> | 2016-03-02 04:56:36 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2016-03-02 04:56:36 +0000 |
commit | 82ebb75cc3c5fab880c8b368af788dbded6a1070 (patch) | |
tree | 5b8d43baf09e06fe170e8babec3923a9ea6b4d9a /pw | |
parent | 41aabc08b56276751e6538be1017556a832dc05a (diff) | |
download | pw-darwin-82ebb75cc3c5fab880c8b368af788dbded6a1070.tar.gz pw-darwin-82ebb75cc3c5fab880c8b368af788dbded6a1070.tar.zst pw-darwin-82ebb75cc3c5fab880c8b368af788dbded6a1070.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
Diffstat (limited to 'pw')
-rw-r--r-- | pw/pw_user.c | 2 |
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) |