summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-29 04:46:19 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-29 04:46:19 +0000
commitd69b62e4d72df143dcd4bea72733f889048cd2f3 (patch)
tree39ff1161c06157fbe02ed41f2451ba010ee39e2a /usr.bin
parentf91240ebe9961cf7fc65e477b9941ea61779def3 (diff)
Will now work with SHA when it happens.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/skey/skeyaudit.sh6
-rw-r--r--usr.bin/skey/skeyinfo.sh7
2 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/skey/skeyaudit.sh b/usr.bin/skey/skeyaudit.sh
index 51711b447ff..a20bf2ae9cf 100644
--- a/usr.bin/skey/skeyaudit.sh
+++ b/usr.bin/skey/skeyaudit.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: skeyaudit.sh,v 1.3 1996/09/27 15:41:36 millert Exp $
+# $OpenBSD: skeyaudit.sh,v 1.4 1996/09/29 04:46:18 millert Exp $
# This script will look thru the skeykeys file for
# people with sequence numbers less then LOWLIMIT=12
# and send them an e-mail reminder to use skeyinit soon
@@ -28,10 +28,10 @@ fi
for i in `$AWK '{print $1}' $KEYDB`
do
-SEQ=`$GREP "^$i[ ]" $KEYDB | $AWK '{if ($2 ~ /^MD[0-9]+/) {print $3} else {print $2}}'`
+SEQ=`$GREP "^$i[ ]" $KEYDB | $AWK '{if ($2 ~ /^[A-z]/) {print $3} else {print $2}}'`
if [ $SEQ -lt $LOWLIMIT ]
then
- KEY=`$GREP "^$i[ ]" $KEYDB | $AWK '{if ($2 ~ /^MD[0-9]+/) {print $4} else {print $3}}'`
+ KEY=`$GREP "^$i[ ]" $KEYDB | $AWK '{if ($2 ~ /^[A-z]/) {print $4} else {print $3}}'`
if [ $SEQ -lt 3 ]
then
SUBJECT="IMPORTANT action required"
diff --git a/usr.bin/skey/skeyinfo.sh b/usr.bin/skey/skeyinfo.sh
index 11d65a69735..33b0b00673b 100644
--- a/usr.bin/skey/skeyinfo.sh
+++ b/usr.bin/skey/skeyinfo.sh
@@ -1,14 +1,15 @@
#!/bin/sh
-# $OpenBSD: skeyinfo.sh,v 1.3 1996/09/27 15:41:37 millert Exp $
+# $OpenBSD: skeyinfo.sh,v 1.4 1996/09/29 04:46:17 millert Exp $
# search /etc/skeykeys for the skey string for
# this user OR user specified in 1st parameter
+KEYDB=/etc/skeykeys
if [ -z "$1" ]; then
WHO=`/usr/bin/whoami`
else
WHO=$1
fi
-if [ -f /etc/skeykeys ]; then
- /usr/bin/awk "{ if (\$1 == \"$WHO\" && \$2 ~ /^MD[0-9]+/) {print \$3-1,\$4} else {print \$2-1,\$3} }" < /etc/skeykeys
+if [ -f $KEYDB ]; then
+ /usr/bin/awk '/^'$WHO'[ ]/ { if ($2 ~ /^[A-z]/) { print $3-1, $4} else { print $2-1, $3 } }' < $KEYDB
fi