mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-30 22:05:46 +00:00
Only set sudo_user.env_vars if the env_add list is empty.
This commit is contained in:
@@ -298,7 +298,7 @@ sudoers_policy_main(int argc, char * const argv[], char *env_add[],
|
|||||||
set_perms(PERM_INITIAL);
|
set_perms(PERM_INITIAL);
|
||||||
|
|
||||||
/* Environment variables specified on the command line. */
|
/* Environment variables specified on the command line. */
|
||||||
if (env_add)
|
if (env_add != NULL && env_add[0] != NULL)
|
||||||
sudo_user.env_vars = env_add;
|
sudo_user.env_vars = env_add;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user