2
0
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:
Todd C. Miller
2000-12-30 03:59:40 +00:00
parent 9318379d83
commit 572b4cf39a
3 changed files with 10 additions and 11 deletions

8
sudo.c
View File

@@ -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