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:  gon...@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)
_______________________________________________
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"

Reply via email to