[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patch: valid usernames in /etc/security
- To: tech@openbsd.org
- Subject: patch: valid usernames in /etc/security
- From: Dan Brosemer <odin@svartalfheim.net>
- Date: Thu, 12 Jun 2003 10:16:30 -0400
- Battlestar-Galactica-Date: 43649 centons, 21 microns, 11.11 lutefisk
- Content-Disposition: inline
- Mail-Followup-To: tech@openbsd.org
- User-Agent: Mutt/1.4.1i
/usr/sbin/user and /usr/sbin/adduser have been updated to allow '$' as the
last character of a username. Here is a one-line patch to prevent
/etc/security from warning about those usernames:
-Dan
--- etc/security.orig Tue Jun 10 17:48:49 2003
+++ etc/security Tue Jun 10 17:49:40 2003
@@ -31,7 +31,7 @@
next;
if ($1 == "")
printf("Line %d has an empty login field:\n%s\n", NR, $0);
- else if ($1 !~ /^[A-Za-z0-9_][A-Za-z0-9_-]*$/)
+ else if ($1 !~ /^[A-Za-z0-9_][A-Za-z0-9_-]*\$?$/)
printf("Login %s has non-alphanumeric characters.\n", $1);
if (length($1) > 31)
printf("Login %s has more than 31 characters.\n", $1);