summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pw/pw_user.c2
-rwxr-xr-xpw/tests/pw_useradd_test.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 62a1613..148239e 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -632,7 +632,7 @@ pw_checkname(char *name, int gecos)
reject = 0;
if (gecos) {
/* See if the name is valid as a gecos (comment) field. */
- badchars = ":!@";
+ badchars = ":";
showtype = "gecos field";
} else {
/* See if the name is valid as a userid or group. */
diff --git a/pw/tests/pw_useradd_test.sh b/pw/tests/pw_useradd_test.sh
index 1a1c7d3..3a88967 100755
--- a/pw/tests/pw_useradd_test.sh
+++ b/pw/tests/pw_useradd_test.sh
@@ -27,9 +27,9 @@ atf_test_case user_add_comments
user_add_comments_body() {
populate_etc_skel
- atf_check -s exit:0 ${PW} useradd test -c "Test User,work,123,456"
- atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \
- grep "^test:.*:Test User,work,123,456:" $HOME/master.passwd
+ atf_check -s exit:0 ${PW} useradd test -c 'Test User,work!,123,user@example.com'
+ atf_check -s exit:0 -o match:'^test:.*:Test User,work!,123,user@example.com:' \
+ grep '^test:.*:Test User,work!,123,user@example.com:' $HOME/master.passwd
}
# Test add user with comments and option -N