If I'm reading the code correctly default variables that are enabled for preservation are specified in the initial_keepenv_table variable in plugins/sudoers/env.c, correct? If possible can preservation of these variables be allowed to be disabled through an option like --no-preserve-env=VAR? I know env -u VAR sudo ... can be a good workaround but better have the capability in sudo itself since it's the one responsible for allowing the default list.
If I'm reading the code correctly default variables that are enabled for preservation are specified in the
initial_keepenv_tablevariable inplugins/sudoers/env.c, correct? If possible can preservation of these variables be allowed to be disabled through an option like--no-preserve-env=VAR? I knowenv -u VAR sudo ...can be a good workaround but better have the capability in sudo itself since it's the one responsible for allowing the default list.