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.
This commit is contained in:
Todd C. Miller
2018-02-28 07:05:36 -07:00
parent 12affcd5ef
commit 4b29e0bd70

View File

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