summaryrefslogtreecommitdiffstats
path: root/pw/pw_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'pw/pw_user.c')
-rw-r--r--pw/pw_user.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 61c2440..30a2749 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -642,7 +642,8 @@ pw_checkname(char *name, int gecos)
}
if (!reject) {
while (*ch) {
- if (strchr(badchars, *ch) != NULL || *ch < ' ' ||
+ if (strchr(badchars, *ch) != NULL ||
+ (!gecos && *ch < ' ') ||
*ch == 127) {
reject = 1;
break;