mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Call env_init() before we open the sudoers sources as those may
call our setenv() replacement.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user