From 4b29e0bd707b1da7570804beb2d5dc6abe0f51e5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 28 Feb 2018 07:05:36 -0700 Subject: [PATCH] Restore line to set MODE_PRESERVE_ENV in flags when the -E command line option is used. The caller doesn't check MODE_PRESERVE_ENV these days but parse_args uses it to detect usage errors when -E is used along with a mutually excusive option. Problem found by Yuriy Vostrikov. --- src/parse_args.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parse_args.c b/src/parse_args.c index f3e1a1289..d1f5e75b1 100644 --- a/src/parse_args.c +++ b/src/parse_args.c @@ -337,6 +337,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, sudo_settings[ARG_PRESERVE_ENVIRONMENT].value = "true"; else parse_env_list(&extra_env, optarg); + SET(flags, MODE_PRESERVE_ENV); break; case 'e': if (mode && mode != MODE_EDIT) -- 2.40.0