mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 14:25:15 +00:00
now use setreuid()
This commit is contained in:
11
sudo.h
11
sudo.h
@@ -289,19 +289,12 @@ 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 getdtablesize() (sysconf(_SC_OPEN_MAX))
|
||||
#define setreuid(__RUID, __EUID) (setresuid(__RUID, __EUID, (uid_t) -1))
|
||||
#define getdtablesize() (sysconf(_SC_OPEN_MAX))
|
||||
#ifndef USE_CWD
|
||||
#define USE_CWD
|
||||
#endif /* USE_CWD */
|
||||
|
Reference in New Issue
Block a user