Allow the -k flag to be used along with the -i and -s flags.

This commit is contained in:
Todd C. Miller
2012-04-09 14:27:33 -04:00
parent 5029c3cdce
commit df067cac47

View File

@@ -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;