mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-04 00:05:11 +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_setpwent();
|
||||||
sudo_setgrent();
|
sudo_setgrent();
|
||||||
|
|
||||||
|
/* Initialize environment functions (including replacements). */
|
||||||
|
env_init(envp);
|
||||||
|
|
||||||
/* Setup defaults data structures. */
|
/* Setup defaults data structures. */
|
||||||
init_defaults();
|
init_defaults();
|
||||||
|
|
||||||
@@ -260,9 +263,6 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
|
|||||||
/* Set login class if applicable. */
|
/* Set login class if applicable. */
|
||||||
set_loginclass(sudo_user.pw);
|
set_loginclass(sudo_user.pw);
|
||||||
|
|
||||||
/* Initialize environment functions (including replacements). */
|
|
||||||
env_init(envp);
|
|
||||||
|
|
||||||
restore_perms();
|
restore_perms();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Reference in New Issue
Block a user