Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Mar 2000 00:30:43 +1030 (CST)
From:      Mark Newton <newton@atdot.dotat.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/17372: rmuser bug
Message-ID:  <200003141400.AAA62460@atdot.dotat.org>

next in thread | raw e-mail | index | archive | help

>Number:         17372
>Category:       bin
>Synopsis:       rmuser(8) incorrectly identifies non-alphanum characters
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 14 06:10:02 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Mark Newton
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
None
>Environment:

	FreeBSD-current

>Description:

	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 :-)

>How-To-Repeat:

	bsd# rmuser Pfoo

>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.

*** /usr/sbin/rmuser	Fri Mar  3 08:53:25 2000
--- rmuser.perl	Wed Mar 15 00:25:51 2000
***************
*** 108,114 ****
      # Username was given as a parameter
      $login_name = pop(@ARGV);
      die "Sorry, login name must contain alphanumeric characters only.\n"
! 	if ($login_name !~ /^[a-z0-9_][a-z0-9_\-]*$/);
  } else {
      if ($affirm) {
  	print STDERR "${whoami}: Error: -y option given without username!\n";
--- 108,114 ----
      # Username was given as a parameter
      $login_name = pop(@ARGV);
      die "Sorry, login name must contain alphanumeric characters only.\n"
! 	if ($login_name !~ /^[a-zA-Z0-9_]{1,}$/);
  } else {
      if ($affirm) {
  	print STDERR "${whoami}: Error: -y option given without username!\n";


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


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




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