summaryrefslogtreecommitdiffstats
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
commite03fe59f20d9945dbf5c12d723679e5648fb27fa (patch)
tree386b039e9d30372a134bb6435af95a9d528d8af8
parentb8da381ca79c1e3846c7241b818e57212f0ae21f (diff)
downloadpw-darwin-e03fe59f20d9945dbf5c12d723679e5648fb27fa.tar.gz
pw-darwin-e03fe59f20d9945dbf5c12d723679e5648fb27fa.tar.zst
pw-darwin-e03fe59f20d9945dbf5c12d723679e5648fb27fa.zip
Allow the "@" and "!" characters in passwd file GECOS fields.
Two PRs (152084 & 210187) request allowing the "@" and/or "!" characters in the passwd file GECOS field. The man page for pw does not mention that those characters are disallowed, Linux supports those characters in this field, and the "@" character in particular would be useful for storing email addresses in that field. PR: 152084, 210187 Submitted by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org> Reported by: jschauma@netmeister.org, Dave Cottlehuber <dch@freebsd.org> Reviewed by: delphij (secteam), vangyzen MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14519
-rw-r--r--pw/pw_user.c2
1 files changed, 1 insertions, 1 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. */