diff options
author | bapt <bapt@FreeBSD.org> | 2015-08-05 20:32:07 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-08-05 20:32:07 +0000 |
commit | c527db206bed3fb6312aeaec912eec311c9fa9f0 (patch) | |
tree | 76e8bb219d0c6805dd47c29e6ca99e80eb3faa75 /usr.sbin | |
parent | 49f78cbad85113f3c8517025048edc0250d67715 (diff) | |
download | FreeBSD-src-c527db206bed3fb6312aeaec912eec311c9fa9f0.zip FreeBSD-src-c527db206bed3fb6312aeaec912eec311c9fa9f0.tar.gz |
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
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 5b46013..500df87 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -388,7 +388,7 @@ pw_user(int mode, char *name, long id, struct cargs * args) 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) |