From owner-freebsd-current Sat Jan 25 0:41:18 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3FC437B401; Sat, 25 Jan 2003 00:41:16 -0800 (PST) Received: from mail.rpi.edu (mail.rpi.edu [128.113.2.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id A119C43F13; Sat, 25 Jan 2003 00:41:07 -0800 (PST) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id h0P8f0Im143986; Sat, 25 Jan 2003 03:41:00 -0500 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: Date: Sat, 25 Jan 2003 03:40:58 -0500 To: freebsd-audit@freebsd.org From: Garance A Drosihn Subject: Changes to pw/pw_user.c Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I sent this message off about 12 hours ago, and I have not seen it appear anywhere. Since then I have received plenty of other messages on the mailing lists (including messages I sent after I sent this one). So, I'm resending this one... On Jan 24/2003, Max Khon wrote to freebsd-current: >hi, there! > >Can we enable using '$' in usernames in pw? >The patch is attached. > >Other variant is to enable using '$' only at end of user name. Here is a patch which allows a '$' as the last character of a userid or a group name. Technically this is based on a patch that Terry Lambert wrote, but by the time I was done with it I imagine it's not recognizable. This has been tested on i386 and sparc64 (beast.freebsd.org seems to be down right now, so I can't do a test-compile on alpha). This version of the patch only changes the pw_checkname() routine, and also includes the previous version of pw_checkname() so you can see how both the old and new routines behave on any given value. This also improves the error messages, and (IMO) makes the routine a lot easier to follow. Assuming there are no objections to this, I plan to rip out everything that's between the #ifdef/endif's of TESTING_PW, and commit the rest to -current sometime next week. I have no plans to MFC this change, but I'll also do that if people want it MFC'ed. Please look it over, and maybe run it through some tests, and let me know of any feedback to it. (Should this print out some kind of warning message that using '$' is generally not a good idea?) Instead of including the patch in my message (which I did the first time), I've put it up at: http://people.freebsd.org/~gad/pw/pw_user-c.diff -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message