From: Todd C. Miller Date: Tue, 27 Apr 2010 01:28:58 +0000 (-0400) Subject: Only set sudo_user.env_vars if the env_add list is empty. X-Git-Tag: SUDO_1_8_0~694 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1abb3b7f57557c7ebf88e9eba64a60a964e6a1ed;p=sudo Only set sudo_user.env_vars if the env_add list is empty. --- diff --git a/plugins/sudoers/sudoers.c b/plugins/sudoers/sudoers.c index 62ca12fd3..24a984900 100644 --- a/plugins/sudoers/sudoers.c +++ b/plugins/sudoers/sudoers.c @@ -298,7 +298,7 @@ sudoers_policy_main(int argc, char * const argv[], char *env_add[], set_perms(PERM_INITIAL); /* Environment variables specified on the command line. */ - if (env_add) + if (env_add != NULL && env_add[0] != NULL) sudo_user.env_vars = env_add; /*