Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 May 2016 21:35:58 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r299483 - stable/10/usr.sbin/pw
Message-ID:  <201605112135.u4BLZwgi024952@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed May 11 21:35:58 2016
New Revision: 299483
URL: https://svnweb.freebsd.org/changeset/base/299483

Log:
  MFC r296300:
  Fix a typo that prevented pw(8) from setting a user's UID to 0.

Modified:
  stable/10/usr.sbin/pw/pw_user.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/pw/pw_user.c
==============================================================================
--- stable/10/usr.sbin/pw/pw_user.c	Wed May 11 21:14:36 2016	(r299482)
+++ stable/10/usr.sbin/pw/pw_user.c	Wed May 11 21:35:58 2016	(r299483)
@@ -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?201605112135.u4BLZwgi024952>