about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/setegid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/setegid.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/setegid.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/setegid.c b/sysdeps/unix/sysv/linux/i386/setegid.c
index b8682e3681..b4bf33f18f 100644
--- a/sysdeps/unix/sysv/linux/i386/setegid.c
+++ b/sysdeps/unix/sysv/linux/i386/setegid.c
@@ -18,11 +18,8 @@
 
 #include <errno.h>
 #include <unistd.h>
-#include <sys/types.h>
-
-#include <sysdep.h>
+#include <setxid.h>
 #include "kernel-features.h"
-#include <pthread-functions.h>
 
 
 #ifdef __NR_setresgid
@@ -42,7 +39,7 @@ setegid (gid)
     }
 
 #if __ASSUME_32BITUIDS > 0
-  result = INLINE_SYSCALL (setresgid32, 3, -1, gid, -1);
+  result = INLINE_SETXID_SYSCALL (setresgid32, 3, -1, gid, -1);
 #else
   /* First try the syscall.  */
 # ifdef __NR_setresgid
@@ -59,18 +56,6 @@ setegid (gid)
     result = __setregid (-1, gid);
 #endif
 
-#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_setresgid32;
-      cmd.id[0] = -1;
-      cmd.id[1] = gid;
-      cmd.id[2] = -1;
-      __libc_pthread_functions.ptr__nptl_setxid (&cmd);
-    }
-#endif
-
   return result;
 }
 libc_hidden_def (setegid)