summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-06-07 19:28:04 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-06-07 19:28:04 +0000
commitf89cb3cad82671c55ebfb0e899c408344c46838b (patch)
treea7a8955f947e743d7699793a3e442efcb61c8e85 /usr.bin
parent0d22b80cba165096912aa5e0c4f5a5233ccaf726 (diff)
Allow -a to specify an alternative auth method, even if secure mode
is used. Only bail out if the user has no skey entry and requests secure mode without specifying an alternative auth method. ok hshoexer@ millert@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/skeyinit/skeyinit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/skeyinit/skeyinit.c b/usr.bin/skeyinit/skeyinit.c
index 4370e39a4bc..c7028dd93ba 100644
--- a/usr.bin/skeyinit/skeyinit.c
+++ b/usr.bin/skeyinit/skeyinit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: skeyinit.c,v 1.47 2004/06/06 11:24:13 otto Exp $ */
+/* $OpenBSD: skeyinit.c,v 1.48 2004/06/07 19:28:03 otto Exp $ */
/* OpenBSD S/Key (skeyinit.c)
*
@@ -93,12 +93,12 @@ main(int argc, char **argv)
case 'a':
if (argv[++i] == NULL || argv[i][0] == '\0')
usage();
- if (auth_type == NULL)
- auth_type = argv[i];
+ auth_type = argv[i];
break;
case 's':
defaultsetup = 0;
- auth_type = "skey";
+ if (auth_type == NULL)
+ auth_type = "skey";
break;
case 'x':
hexmode = 1;
@@ -179,7 +179,7 @@ main(int argc, char **argv)
/* existing user */
break;
case 1:
- if (!defaultsetup) {
+ if (!defaultsetup && strcmp(auth_type, "skey") == 0) {
fprintf(stderr,
"You must authenticate yourself before using S/Key for the first time. In\n"
"secure mode this is normally done via an existing S/Key key. However, since\n"