From e03fe59f20d9945dbf5c12d723679e5648fb27fa Mon Sep 17 00:00:00 2001 From: David Bright Date: Thu, 1 Mar 2018 17:47:28 +0000 Subject: 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 Reported by: jschauma@netmeister.org, Dave Cottlehuber Reviewed by: delphij (secteam), vangyzen MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D14519 --- pw/pw_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. */ -- cgit v1.2.3-56-ge451