From: Klas Lindfors Date: Thu, 23 Jan 2014 07:37:23 +0000 (+0100) Subject: refuse challenge on command line if -t is given X-Git-Tag: v1.15.1~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab3b2a9f6d22442c4620eccf56224074f614df03;p=yubikey-personalization refuse challenge on command line if -t is given --- diff --git a/ykchalresp.c b/ykchalresp.c index db0d5fa..0efeb70 100644 --- a/ykchalresp.c +++ b/ykchalresp.c @@ -133,7 +133,7 @@ static int parse_args(int argc, char **argv, } } - if (optind >= argc && !*totp) { + if ((optind >= argc && !*totp) || (optind < argc && *totp)) { /* No challenge */ fputs(usage, stderr); return 0;