Back to index

glibc  2.9
local-setxid.h
Go to the documentation of this file.
00001 /* SETxID functions which only have to change the local thread and
00002    none of the possible other threads.  */
00003 #include <kernel-features.h>
00004 #include <sysdep.h>
00005 
00006 /* If we can use the syscall directly, use it.  */
00007 #if __ASSUME_32BITUIDS > 0 && defined __NR_setresuid32
00008 # define local_seteuid(id) INLINE_SYSCALL (setresuid32, 3, -1, id, -1)
00009 #elif __ASSUME_SETRESUID_SYSCALL > 0
00010 # define local_seteuid(id) INLINE_SYSCALL (setresuid, 3, -1, id, -1)
00011 #else
00012 # define local_seteuid(id) seteuid (id)
00013 #endif
00014 
00015 
00016 /* If we can use the syscall directly, use it.  */
00017 #if __ASSUME_32BITUIDS > 0 && defined __NR_setresgid32
00018 # define local_setegid(id) INLINE_SYSCALL (setresgid32, 3, -1, id, -1)
00019 #elif __ASSUME_SETRESGID_SYSCALL > 0
00020 # define local_setegid(id) INLINE_SYSCALL (setresgid, 3, -1, id, -1)
00021 #else
00022 # define local_setegid(id) setegid (id)
00023 #endif