Subject: Re: misc/29913
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Peter Postma <peter@pointless.nl>
List: netbsd-bugs
Date: 04/10/2005 12:52:01
The following reply was made to PR misc/29913; it has been noted by GNATS.

From: Peter Postma <peter@pointless.nl>
To: gnats-bugs@netbsd.org
Cc: arto@selonen.org
Subject: Re: misc/29913
Date: Sun, 10 Apr 2005 14:37:18 +0200

 --VbJkn9YxBvnuCH5J
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 >> Fix:
 > Make /etc/security know about special system accounts using '_' as
 > first character.
 
 Ok, and while we are here, we could also allow embedded underscores and dots.
 Please try the attached patch. 
 
 -- 
 Peter Postma
 
 --VbJkn9YxBvnuCH5J
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="security.diff"
 
 Index: security
 ===================================================================
 RCS file: /cvsroot/src/etc/security,v
 retrieving revision 1.94
 diff -u -r1.94 security
 --- security	5 Feb 2005 15:26:37 -0000	1.94
 +++ security	10 Apr 2005 12:34:08 -0000
 @@ -222,7 +222,7 @@
  			next;
  		}
  		if (!permit_nonalpha &&
 -		    $1 !~ /^[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])*$/)
 +		    $1 !~ /^[_A-Za-z0-9]([_\.\-A-Za-z0-9]*[A-Za-z0-9])*$/)
  			printf "Login %s has non-alphanumeric characters.\n",
  			    $1;
  		if (length($1) > len)
 @@ -292,7 +292,7 @@
  		if ($1 == "+" )  {
  			next;
  		}
 -		if ($1 !~ /^[A-Za-z0-9]([-A-Za-z0-9]*[A-Za-z0-9])*$/)
 +		if ($1 !~ /^[_A-Za-z0-9]([_\.\-A-Za-z0-9]*[A-Za-z0-9])*$/)
  			printf "Group %s has non-alphanumeric characters.\n",
  			    $1;
  		if (length($1) > len)
 
 --VbJkn9YxBvnuCH5J--