2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Call env_init() before we open the sudoers sources as those may

call our setenv() replacement.
This commit is contained in:
Todd C. Miller
2010-05-12 08:32:12 -04:00
parent 754c1a16dd
commit 1487026b03

View File

@@ -208,6 +208,9 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
sudo_setpwent();
sudo_setgrent();
/* Initialize environment functions (including replacements). */
env_init(envp);
/* Setup defaults data structures. */
init_defaults();
@@ -260,9 +263,6 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
/* Set login class if applicable. */
set_loginclass(sudo_user.pw);
/* Initialize environment functions (including replacements). */
env_init(envp);
restore_perms();
return TRUE;