From: Todd C. Miller Date: Mon, 18 Oct 1993 00:31:05 +0000 (+0000) Subject: linux patch X-Git-Tag: SUDO_1_3_0~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8282217cc5a46e29fda0d4a70b7c63a0d4e3994f;p=sudo linux patch --- diff --git a/sudo.h b/sudo.h index bc15dc552..76ed41622 100644 --- a/sudo.h +++ b/sudo.h @@ -250,11 +250,18 @@ extern char **Envp; #endif extern int errno; +/* + * Emulate setruid() under linux + */ +#ifdef linux +#define setruid(__RUID) (setreuid((uid_t) (__RUID), (uid_t) -1)) +#endif /* linux */ + /* * This is to placate hpux */ #ifdef hpux -#define setruid(__RUID) (setresuid((uid_t)(__RUID), (uid_t) -1, (uid_t) -1)) +#define setruid(__RUID) (setresuid((uid_t) (__RUID), (uid_t) -1, (uid_t) -1)) #define getdtablesize() (sysconf(_SC_OPEN_MAX)) #ifndef USE_CWD #define USE_CWD