Bug 17372

Summary: rmuser(8) incorrectly identifies non-alphanum characters
Product: Base System Reporter: Mark Newton <newton>
Component: binAssignee: newton
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Mark Newton 2000-03-14 14:10:02 UTC
	rmuser complains about non-alphanumeric characters if the
	username you attempt to delete contains capital letters.  This
	causes problems for sites which attempt to call PPP users
	"Pfoo" and SLIP users "Sfoo" (such as an ISP run by a friend
	of mine :-)

Fix: I'm happy to commit this myself;  just getting it into the PR
	system so that anyone else who searches for it later will see
	that it has been fixed on this date.

	I'll commit it later tonight then close the PR.
How-To-Repeat: 
	bsd# rmuser Pfoo
Comment 1 newton freebsd_committer freebsd_triage 2000-03-14 14:15:57 UTC
Responsible Changed
From-To: freebsd-bugs->newton

Taking responsibility for my own PR 

Comment 2 Sheldon Hearn 2000-03-14 14:18:51 UTC
On Wed, 15 Mar 2000 00:30:43 +1030, Mark Newton wrote:

> 	I'll commit it later tonight then close the PR.

Slow down. :-)

> ! 	if ($login_name !~ /^[a-z0-9_][a-z0-9_\-]*$/);
> ! 	if ($login_name !~ /^[a-zA-Z0-9_]{1,}$/);

Look at what you're doing.  Before, usernames had to start with a
non-numeric character.  You've changed more than you meant to. :-)

Try this:

	if ($login_name !~ /^[a-z0-9_]\w*$/);

Ciao,
Sheldon.
Comment 3 newton freebsd_committer freebsd_triage 2000-03-14 14:30:56 UTC
State Changed
From-To: open->closed

Fix committed - rev 1.10 of usr.sbin/adduser/rmuser.perl