From owner-freebsd-bugs Thu Jan 14 02:30:40 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA19820 for freebsd-bugs-outgoing; Thu, 14 Jan 1999 02:30:40 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA19815 for ; Thu, 14 Jan 1999 02:30:38 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id CAA22024; Thu, 14 Jan 1999 02:30:02 -0800 (PST) Date: Thu, 14 Jan 1999 02:30:02 -0800 (PST) Message-Id: <199901141030.CAA22024@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.ORG From: "Matthew D. Fuller" Subject: Re: bin/9484: False error while adding a user, whose uid begins with a number, via sysinstall Reply-To: "Matthew D. Fuller" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/9484; it has been noted by GNATS. From: "Matthew D. Fuller" 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