From df067cac4785528b79c09ad784f6754ad8c0aa26 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 9 Apr 2012 14:27:33 -0400 Subject: [PATCH] Allow the -k flag to be used along with the -i and -s flags. --- src/parse_args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse_args.c b/src/parse_args.c index 22a4d20a6..bcdfd862f 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -317,7 +317,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp, if (!mode) { /* Defer -k mode setting until we know whether it is a flag or not */ if (sudo_settings[ARG_IGNORE_TICKET].value != NULL) { - if (argc == 0) { + if (argc == 0 && !(flags & (MODE_SHELL|MODE_LOGIN_SHELL))) { mode = MODE_INVALIDATE; /* -k by itself */ sudo_settings[ARG_IGNORE_TICKET].value = NULL; valid_flags = 0;