Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Mar 2016 04:56:36 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296300 - head/usr.sbin/pw
Message-ID:  <201603020456.u224uauH062793@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Mar  2 04:56:36 2016
New Revision: 296300
URL: https://svnweb.freebsd.org/changeset/base/296300

Log:
  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

Modified:
  head/usr.sbin/pw/pw_user.c

Modified: head/usr.sbin/pw/pw_user.c
==============================================================================
--- head/usr.sbin/pw/pw_user.c	Wed Mar  2 03:28:57 2016	(r296299)
+++ head/usr.sbin/pw/pw_user.c	Wed Mar  2 04:56:36 2016	(r296300)
@@ -1654,7 +1654,7 @@ pw_user_mod(int argc, char **argv, char 
 		}
 	}
 
-	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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603020456.u224uauH062793>