2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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:
Todd C. Miller
2011-10-04 11:15:06 -04:00
parent b743b77a0d
commit 930122d346

View File

@@ -189,7 +189,9 @@ sudoers_policy_open(unsigned int version, sudo_conv_t conversation,
/* Parse nsswitch.conf for sudoers order. */
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_ROOT);
/* Open and parse sudoers, set global defaults */
tq_foreach_fwd(snl, nss) {