-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sysdeps/posix/spawni.c (__spawni): Use local_seteuid and
local_setegid instead of seteuid and setegid. * sysdeps/generic/local-setxid.h: New file. * sysdeps/unix/sysv/linux/local-setxid.h: New file.
- Loading branch information
Ulrich Drepper
committed
Jun 4, 2006
1 parent
7231452
commit 1b8373f
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* No special support. Fall back to the regular functions. */ | ||
|
||
#define local_seteuid(id) seteuid (id) | ||
#define local_setegid(id) setegid (id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* SETxID functions which only have to change the local thread and | ||
none of the possible other threads. */ | ||
#include <kernel-features.h> | ||
#include <sysdep.h> | ||
|
||
/* If we can use the syscall directly, use it. */ | ||
#if __ASSUME_32BITUIDS > 0 && defined __NR_setresuid32 | ||
# define local_seteuid(id) INLINE_SYSCALL (setresuid32, 3, -1, id, -1) | ||
#elif __ASSUME_SETRESUID_SYSCALL > 0 | ||
# define local_seteuid(id) INLINE_SYSCALL (setresuid, 3, -1, id, -1) | ||
#else | ||
# define local_seteuid(id) seteuid (id) | ||
#endif | ||
|
||
|
||
/* If we can use the syscall directly, use it. */ | ||
#if __ASSUME_32BITUIDS > 0 && defined __NR_setresgid32 | ||
# define local_setegid(id) INLINE_SYSCALL (setresgid32, 3, -1, id, -1) | ||
#elif __ASSUME_SETRESGID_SYSCALL > 0 | ||
# define local_setegid(id) INLINE_SYSCALL (setresgid, 3, -1, id, -1) | ||
#else | ||
# define local_setegid(id) setegid (id) | ||
#endif |