From 82ebb75cc3c5fab880c8b368af788dbded6a1070 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 2 Mar 2016 04:56:36 +0000 Subject: 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 --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pw') 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) -- cgit v1.2.3-56-ge451