Browse Source

The hyphen in regexp should really be escaped

ok millert@
OPENBSD_3_4
grange 21 years ago
parent
commit
bccca5e422
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/etc/security

+ 2
- 2
src/etc/security View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: security,v 1.58 2003/06/13 15:55:57 millert Exp $
# $OpenBSD: security,v 1.59 2003/06/15 22:12:32 grange Exp $
# from: @(#)security 8.1 (Berkeley) 6/9/93
#
@ -31,7 +31,7 @@ awk -F: '{
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);


Loading…
Cancel
Save