diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-05-04 00:37:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2009-05-04 00:37:04 +0000 |
commit | 44e88be1910160cbb862ef96b1e66298fbee1b98 (patch) | |
tree | 7bb4951cb58e27fca1de2ae9cc5e3b8c3742ecb0 /etc/security | |
parent | 76f41a467495ead3a95906f5a46d9c9ec863a92b (diff) |
The strings "x5y" and "-42" are not valid group IDs, so fix the regex,
and fix two pastos in the printf(1) reporting bad group IDs;
ok okan@
Diffstat (limited to 'etc/security')
-rw-r--r-- | etc/security | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/security b/etc/security index 14abf75c900..b38ec4d98cf 100644 --- a/etc/security +++ b/etc/security @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: security,v 1.82 2009/03/23 15:14:50 ajacoutot Exp $ +# $OpenBSD: security,v 1.83 2009/05/04 00:37:03 schwarze Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -112,8 +112,8 @@ awk -F: '{ printf("Group %s has non-alphanumeric characters.\n", $1); if (length($1) > 31) printf("Group %s has more than 31 characters.\n", $1); - if ($3 !~ /[0-9]*/) - printf("Login %s has a negative group ID.\n", $1); + if ($3 !~ /^[0-9]*$/) + printf("Group %s has an invalid group ID.\n", $1); }' < $GRP > $OUTPUT if [ -s $OUTPUT ] ; then echo "\nChecking the ${GRP} file:" |