diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-07 15:35:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-07 15:35:56 +0000 |
commit | a506687da5269ebb8a19b1bdd0ee2904c343c115 (patch) | |
tree | c5f65cad0520f7252e6bd0f55e799076feb56707 /etc | |
parent | ea70e8930f64ce7e908bd9ad66c82af76d25389c (diff) |
when testing passwd(5) expire field, force its value to an int before
checking for non-zero since an empty field is equivalent to 0.
Problem noted by Graeme Lee.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/security | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/security b/etc/security index 573fc1adac3..db773beef19 100644 --- a/etc/security +++ b/etc/security @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: security,v 1.63 2003/07/03 23:05:42 millert Exp $ +# $OpenBSD: security,v 1.64 2003/07/07 15:35:55 millert Exp $ # from: @(#)security 8.1 (Berkeley) 6/9/93 # @@ -52,7 +52,7 @@ awk -F: '{ printf("Login %s has a negative user ID.\n", $1); if ($4 < 0) printf("Login %s has a negative group ID.\n", $1); - if ($7 != 0 && system("test "$7" -lt `date +%s`") == 0) + if (int($7) != 0 && system("test "$7" -lt `date +%s`") == 0) printf("Login %s has expired.\n", $1); }' < $MP > $OUTPUT if [ -s $OUTPUT ] ; then |