]> granicus.if.org Git - sudo/commitdiff
Only set sudo_user.env_vars if the env_add list is empty.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 27 Apr 2010 01:28:58 +0000 (21:28 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 27 Apr 2010 01:28:58 +0000 (21:28 -0400)
plugins/sudoers/sudoers.c

index 62ca12fd3970f9fd10bd4aac150969b7e25f5709..24a98490010b8dd2da838f67d589fb5d23066df4 100644 (file)
@@ -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;
 
     /*