Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Jan 1999 02:30:02 -0800 (PST)
From:      "Matthew D. Fuller" <fullermd@futuresouth.com>
To:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/9484: False error while adding a user, whose uid begins with a number, via sysinstall
Message-ID:  <199901141030.CAA22024@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/9484; it has been noted by GNATS.

From: "Matthew D. Fuller" <fullermd@futuresouth.com>
To: merlin@ghostwheel.com, freebsd-gnats-submit@FreeBSD.ORG
Cc:  
Subject: Re: bin/9484: False error while adding a user, whose uid begins with a number, via sysinstall
Date: Thu, 14 Jan 1999 04:27:37 -0600

 This patch appears (from the testing I've done on a -CURRENT system here)
 to work.  I think the formatting might not make it past that custom bde
 filter CVS seems to use ;)   but functionally it looks sound to me.
 
 Index: pw_user.c
 ===================================================================
 RCS file: /usr/cvs/src/usr.sbin/pw/pw_user.c,v
 retrieving revision 1.25
 diff -u -r1.25 pw_user.c
 --- pw_user.c	1999/01/04 14:07:53	1.25
 +++ pw_user.c	1999/01/14 10:15:23
 @@ -291,7 +291,9 @@
  		 * really don't really care which we have, but we need to
  		 * know.
  		 */
 -		if (mode != M_ADD && pwd == NULL && isdigit(*a_name->val) && atoi(a_name->val) > 0) {	/* Assume uid */
 +		if (mode != M_ADD && pwd == NULL
 +			&& (strspn(a_name->val, "0123456789") == strlen(a_name->val))
 +			&& atoi(a_name->val) > 0) {	/* Assume uid */
  			(a_uid = a_name)->ch = 'u';
  			a_name = NULL;
  		}
 
 
 ---
 
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
 | Matthew Fuller     http://www.over-yonder.net/~fullermd |
 * fullermd@futuresouth.com       fullermd@over-yonder.net *
 | UNIX Systems Administrator      Specializing in FreeBSD |
 *   FutureSouth Communications   ISPHelp ISP Consulting   *
 |  "The only reason I'm burning my candle at both ends,   |
 *     because I haven't figured out how to light the      *
 |                     middle yet"                         |
 *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

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?199901141030.CAA22024>