summaryrefslogtreecommitdiff
path: root/usr.bin/skeyinit
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-07-09 17:04:01 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-07-09 17:04:01 +0000
commit468a6f3f59475078b14e116d6e69d30cf08dd119 (patch)
tree6febf208fb3058741f204c25548721170e6b5416 /usr.bin/skeyinit
parentf60fc9848d2d57716dfb5f14a62bd151f302fbb8 (diff)
say "s/key disabled" if skeykeys file does not exist. I thought I committed this ages ago.
Diffstat (limited to 'usr.bin/skeyinit')
-rw-r--r--usr.bin/skeyinit/skeyinit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 131bab61612..369de21be43 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.20 1997/07/27 21:36:05 millert Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.21 1998/07/09 17:04:00 millert Exp $ */
/* $NetBSD: skeyinit.c,v 1.6 1995/06/05 19:50:48 pk Exp $ */
/* S/KEY v1.1b (skeyinit.c)
@@ -147,7 +147,11 @@ main(argc, argv)
rval = skeylookup(&skey, pp->pw_name);
switch (rval) {
case -1:
- err(1, "cannot open database");
+ if (errno == ENOENT)
+ errx(1, "s/key disabled");
+ else
+ err(1, "cannot open database");
+ break;
case 0:
/* comment out user if asked to */
if (zerokey)