mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 15:25:58 +00:00
It appears that LDAP or NSS may modify the euid so we need to be
root for the open(). We restore the old perms at the end of sudoers_policy_open().
This commit is contained in:
@@ -189,7 +189,9 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
|
|||||||
/* Parse nsswitch.conf for sudoers order. */
|
/* Parse nsswitch.conf for sudoers order. */
|
||||||
snl = sudo_read_nss();
|
snl = sudo_read_nss();
|
||||||
|
|
||||||
|
/* LDAP or NSS may modify the euid so we need to be root for the open. */
|
||||||
set_perms(PERM_INITIAL);
|
set_perms(PERM_INITIAL);
|
||||||
|
set_perms(PERM_ROOT);
|
||||||
|
|
||||||
/* Open and parse sudoers, set global defaults */
|
/* Open and parse sudoers, set global defaults */
|
||||||
tq_foreach_fwd(snl, nss) {
|
tq_foreach_fwd(snl, nss) {
|
||||||
|
Reference in New Issue
Block a user