mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Don't try and build saved uid version of set_perms on systems w/o them.
Rename set_perms_saved_uid() -> set_perms_posix() Make set_perms_setreuid simply be set_perms_fallback() and simply include the appropriate function at compile time (setreuid() vs. setuid()).
This commit is contained in:
8
sudo.c
8
sudo.c
@@ -856,14 +856,10 @@ initial_setup()
|
||||
/* Set set_perms pointer to the correct function */
|
||||
#if defined(_SC_SAVED_IDS) && defined(_SC_VERSION)
|
||||
if (sysconf(_SC_SAVED_IDS) == 1 && sysconf(_SC_VERSION) >= 199009)
|
||||
set_perms = set_perms_saved_uid;
|
||||
set_perms = set_perms_posix;
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_SETREUID
|
||||
set_perms = set_perms_setreuid;
|
||||
#else
|
||||
set_perms = set_perms_fallback;
|
||||
#endif
|
||||
set_perms = set_perms_fallback;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LOGIN_CAP_H
|
||||
|
Reference in New Issue
Block a user