svn commit: r286340 - stable/10/usr.sbin/pw
Baptiste Daroussin
bapt at FreeBSD.org
Wed Aug 5 20:32:08 UTC 2015
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 at 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)
More information about the svn-src-stable
mailing list