From 1abb3b7f57557c7ebf88e9eba64a60a964e6a1ed Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 26 Apr 2010 21:28:58 -0400 Subject: [PATCH] Only set sudo_user.env_vars if the env_add list is empty. --- plugins/sudoers/sudoers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; /*