Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Aug 2015 20:32:08 +0000 (UTC)
From:      Baptiste Daroussin <bapt@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: r286340 - stable/10/usr.sbin/pw
Message-ID:  <201508052032.t75KW8T9024987@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Wed Aug  5 20:32:07 2015
New Revision: 286340
URL: https://svnweb.freebsd.org/changeset/base/286340

Log:
  Fix segfault were modifying the uid of a user
  
  Do a direct commit as the code on head has changed a lot and does not fail in
  that case
  
  PR:		202111
  Reported by:	gondim@bsdinfo.com.br

Modified:
  stable/10/usr.sbin/pw/pw_user.c

Modified: stable/10/usr.sbin/pw/pw_user.c
==============================================================================
--- stable/10/usr.sbin/pw/pw_user.c	Wed Aug  5 19:56:23 2015	(r286339)
+++ stable/10/usr.sbin/pw/pw_user.c	Wed Aug  5 20:32:07 2015	(r286340)
@@ -388,7 +388,7 @@ pw_user(int mode, char *name, long id, s
 			edited = 1;
 		}
 
-		if (id > 0 && isdigit((unsigned char)*arg->val)) {
+		if (id > 0) {
 			pwd->pw_uid = (uid_t)id;
 			edited = 1;
 			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?201508052032.t75KW8T9024987>