From nobody@FreeBSD.org  Tue Nov  9 18:24:33 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2D88F106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Nov 2010 18:24:33 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 1C2E78FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  9 Nov 2010 18:24:33 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id oA9IOWac094764
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 9 Nov 2010 18:24:32 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id oA9IOWXY094751;
	Tue, 9 Nov 2010 18:24:32 GMT
	(envelope-from nobody)
Message-Id: <201011091824.oA9IOWXY094751@www.freebsd.org>
Date: Tue, 9 Nov 2010 18:24:32 GMT
From: Jan Schaumann <jschauma@netmeister.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: pw(8) does not allow @ or ! in gecos
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         152084
>Category:       bin
>Synopsis:       [patch] pw(8) does not allow @ or ! in gecos
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 09 18:30:11 UTC 2010
>Closed-Date:    
>Last-Modified:  Fri Nov 12 09:33:35 UTC 2010
>Originator:     Jan Schaumann
>Release:        
>Organization:
>Environment:
>Description:
pw(8) does not allow you to add a user with a ! or a @ in the gecos field.  I have not been able to find any standard mentioning these as invalid characters, nor do various other unix flavors implement this restriction.
>How-To-Repeat:
pw user add -n name -u uid -g gid -d dir -s shell -c"Something with an @ in it"

>Fix:
--- pw_user.c.orig      Tue Nov  9 10:22:10 2010
+++ pw_user.c   Tue Nov  9 10:24:01 2010
@@ -1172,7 +1172,7 @@
        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. */


>Release-Note:
>Audit-Trail:
>Unformatted:
