summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pw/pw_user.c
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2016-03-02 04:56:36 +0000
committermarkj <markj@FreeBSD.org>2016-03-02 04:56:36 +0000
commit87175eabd73e5562787b2fe36328556a4f0df6a4 (patch)
tree583ab230fa3e1ed98b9debf05b15053db6b24bf7 /usr.sbin/pw/pw_user.c
parent284e753ba98939b13927c8623439169ceb1a11e4 (diff)
downloadFreeBSD-src-87175eabd73e5562787b2fe36328556a4f0df6a4.zip
FreeBSD-src-87175eabd73e5562787b2fe36328556a4f0df6a4.tar.gz
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 'usr.sbin/pw/pw_user.c')
-rw-r--r--usr.sbin/pw/pw_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index 30a2749..2f87b56 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/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)
OpenPOWER on IntegriCloud