misc/152084: pw(8) does not allow @ or ! in gecos

Jan Schaumann jschauma at netmeister.org
Tue Nov 9 18:30:12 UTC 2010


>Number:         152084
>Category:       misc
>Synopsis:       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:
>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:


More information about the freebsd-bugs mailing list