]> err.no Git - yubikey-personalization/commitdiff
refuse challenge on command line if -t is given
authorKlas Lindfors <klas@yubico.com>
Thu, 23 Jan 2014 07:37:23 +0000 (08:37 +0100)
committerKlas Lindfors <klas@yubico.com>
Thu, 23 Jan 2014 07:37:23 +0000 (08:37 +0100)
ykchalresp.c

index db0d5fabf12ff24cf0626d7125f61888a855b95f..0efeb709bde9c2cc17aacd2034d5f673b8f83e9d 100644 (file)
@@ -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;