From 85bd63313720ed5e7f10427ec5f0d2f59ee23614 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 12 Nov 2004 01:15:06 +0000 Subject: 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. --- sysdeps/unix/sysv/linux/alpha/setregid.c | 26 ++------------------------ sysdeps/unix/sysv/linux/alpha/setresgid.c | 28 +++------------------------- sysdeps/unix/sysv/linux/alpha/setresuid.c | 28 +++------------------------- sysdeps/unix/sysv/linux/alpha/setreuid.c | 26 ++------------------------ 4 files changed, 10 insertions(+), 98 deletions(-) (limited to 'sysdeps/unix/sysv/linux/alpha') 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 #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include 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 #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include 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 #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include 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 #include -#include - -#include -#include - -#include -#include "kernel-features.h" -#include +#include 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) -- cgit v1.2.3-70-g09d2