diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-11-12 01:15:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-11-12 01:15:06 +0000 |
commit | 6deb629a5447613bfddf7f24cffbcd28b985667f (patch) | |
tree | e5356e19e9a10fe1100aef814e954e9a3bbb5ad7 | |
parent | 463402af3aa80a0c408a1228c6587e56ebf58067 (diff) | |
download | glibc-6deb629a5447613bfddf7f24cffbcd28b985667f.tar glibc-6deb629a5447613bfddf7f24cffbcd28b985667f.tar.gz glibc-6deb629a5447613bfddf7f24cffbcd28b985667f.tar.bz2 glibc-6deb629a5447613bfddf7f24cffbcd28b985667f.zip |
Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and
pthread-functions.h includes. Include setxid.h. Use
INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the
HAVE_PTR__NPTL_SETXID guarded snippets.
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/setregid.c | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/setresgid.c | 28 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/setresuid.c | 28 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/setreuid.c | 26 |
4 files changed, 10 insertions, 98 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/setregid.c b/sysdeps/unix/sysv/linux/alpha/setregid.c index cfc8283c3a..0973fe4ac1 100644 --- a/sysdeps/unix/sysv/linux/alpha/setregid.c +++ b/sysdeps/unix/sysv/linux/alpha/setregid.c @@ -18,35 +18,13 @@ #include <errno.h> #include <unistd.h> -#include <sys/types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#include <linux/posix_types.h> -#include "kernel-features.h" -#include <pthread-functions.h> +#include <setxid.h> int __setregid (gid_t rgid, gid_t egid) { - int result; - - result = INLINE_SYSCALL (setregid, 2, (signed int)rgid, (signed int)egid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setregid; - cmd.id[0] = rgid; - cmd.id[1] = egid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setregid, 2, (int) rgid, (int) egid); } #ifndef __setregid weak_alias (__setregid, setregid) diff --git a/sysdeps/unix/sysv/linux/alpha/setresgid.c b/sysdeps/unix/sysv/linux/alpha/setresgid.c index fdfa486534..50e29e3c76 100644 --- a/sysdeps/unix/sysv/linux/alpha/setresgid.c +++ b/sysdeps/unix/sysv/linux/alpha/setresgid.c @@ -18,36 +18,14 @@ #include <errno.h> #include <unistd.h> -#include <sys/types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#include <linux/posix_types.h> -#include "kernel-features.h" -#include <pthread-functions.h> +#include <setxid.h> int __setresgid (gid_t rgid, gid_t egid, gid_t sgid) { - int result; - - result = INLINE_SYSCALL (setresgid, 3, (signed int)rgid, (signed int)egid, (signed int)sgid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setresgid; - cmd.id[0] = rgid; - cmd.id[1] = egid; - cmd.id[2] = sgid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setresgid, 3, (int) rgid, + (int) egid, (int) sgid); } libc_hidden_def (__setresgid) #ifndef __setresgid diff --git a/sysdeps/unix/sysv/linux/alpha/setresuid.c b/sysdeps/unix/sysv/linux/alpha/setresuid.c index 49671278ee..e76413bf6a 100644 --- a/sysdeps/unix/sysv/linux/alpha/setresuid.c +++ b/sysdeps/unix/sysv/linux/alpha/setresuid.c @@ -18,36 +18,14 @@ #include <errno.h> #include <unistd.h> -#include <sys/types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#include <linux/posix_types.h> -#include "kernel-features.h" -#include <pthread-functions.h> +#include <setxid.h> int __setresuid (uid_t ruid, uid_t euid, uid_t suid) { - int result; - - result = INLINE_SYSCALL (setresuid, 3, (signed int)ruid, (signed int)euid, (signed int)suid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setresuid; - cmd.id[0] = ruid; - cmd.id[1] = euid; - cmd.id[2] = suid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setresuid, 3, (int) ruid, + (int) euid, (int) suid); } libc_hidden_def (__setresuid) #ifndef __setresuid diff --git a/sysdeps/unix/sysv/linux/alpha/setreuid.c b/sysdeps/unix/sysv/linux/alpha/setreuid.c index b29aed479e..a23a34792e 100644 --- a/sysdeps/unix/sysv/linux/alpha/setreuid.c +++ b/sysdeps/unix/sysv/linux/alpha/setreuid.c @@ -18,35 +18,13 @@ #include <errno.h> #include <unistd.h> -#include <sys/types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#include <linux/posix_types.h> -#include "kernel-features.h" -#include <pthread-functions.h> +#include <setxid.h> int __setreuid (uid_t ruid, uid_t euid) { - int result; - - result = INLINE_SYSCALL (setreuid, 2, (signed int)ruid, (signed int)euid); - -#if defined HAVE_PTR__NPTL_SETXID && !defined SINGLE_THREAD - if (result == 0 && __libc_pthread_functions.ptr__nptl_setxid != NULL) - { - struct xid_command cmd; - cmd.syscall_no = __NR_setreuid; - cmd.id[0] = ruid; - cmd.id[1] = euid; - __libc_pthread_functions.ptr__nptl_setxid (&cmd); - } -#endif - - return result; + return INLINE_SETXID_SYSCALL (setreuid, 2, (int) ruid, (int) euid); } #ifndef __setreuid weak_alias (__setreuid, setreuid) |