aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorDavid Bright <dab@FreeBSD.org>2018-03-01 17:47:28 +0000
committerDavid Bright <dab@FreeBSD.org>2018-03-01 17:47:28 +0000
commit32bd1c2bb38f96c6d37b4c76a139058357e46668 (patch)
tree49113e992fa1d4309b91fbc54038655ad2faaeab /usr.sbin
parent4ffd72e34cb3f45ede886c9e30b2a5f705b33132 (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pw/pw_user.c2
-rwxr-xr-xusr.sbin/pw/tests/pw_useradd_test.sh6
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index 62a1613322db..148239ebd2b5 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/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/usr.sbin/pw/tests/pw_useradd_test.sh b/usr.sbin/pw/tests/pw_useradd_test.sh
index 1a1c7d312463..3a88967652c0 100755
--- a/usr.sbin/pw/tests/pw_useradd_test.sh
+++ b/usr.sbin/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