Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2001 13:40:36 -0700 (PDT)
From:      Jim Pirzyk <Jim.Pirzyk@disney.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/31049: /usr/sbin/adduser does not allow '.' in login name. [PATCH]
Message-ID:  <200110042040.f94KeaV45606@snoopy.fan.fa.disney.com>

index | next in thread | raw e-mail


>Number:         31049
>Category:       bin
>Synopsis:       /usr/sbin/adduser does not allow '.' in login name. [PATCH]
>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:   Thu Oct 04 13:50:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jim Pirzyk
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD snoopy 4.4-RELEASE FreeBSD 4.4-RELEASE #2: Fri Sep 21 11:16:23 PDT 2001 root@snoopy:/auto/roy/dist/pub/FreeBSD/4.4-RELEASE/sys/compile/UP_WORKSTATION i386


	
>Description:
	You cannot add a user account with a '.' in it even though a '.' is a
	valid login character per POSIX (XBDd6 section 3.426)

>How-To-Repeat:
	
>Fix:
--- adduser.perl.orig   Mon Jul 30 16:56:48 2001
+++ adduser.perl        Thu Oct  4 13:36:51 2001
@@ -309,7 +309,7 @@
     local($name);
 
     while(1) {
-       $name = &confirm_list("Enter username", 1, "a-z0-9_-", "");
+       $name = &confirm_list("Enter username", 1, "a-z0-9_-.", "");
        if (length($name) > 16) {
            warn "Username is longer than 16 chars\a\n";
            next;
@@ -322,7 +322,7 @@
 sub new_users_name_valid {
     local($name) = @_;
 
-    if ($name !~ /^[a-z0-9_][a-z0-9_\-]*$/ || $name eq "a-z0-9_-") {
+    if ($name !~ /^[a-z0-9_][a-z0-9_\-\.]*$/ || $name eq "a-z0-9_-.") {
        warn "Wrong username. " .
            "Please use only lowercase characters or digits\a\n";
        return 0;

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

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110042040.f94KeaV45606>