about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/setgroups.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-05-25 19:19:30 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-05-25 19:19:30 +0000
commit21708942c9b115a91dc03318a5f9e14328c5a71e (patch)
treee0b3797820e23ab73ebdab3c34d20943e911669b /sysdeps/unix/sysv/linux/i386/setgroups.c
parenta386f1cc229e7de02740bef18bdd5d272d1e7537 (diff)
downloadglibc-21708942c9b115a91dc03318a5f9e14328c5a71e.tar.gz
glibc-21708942c9b115a91dc03318a5f9e14328c5a71e.tar.xz
glibc-21708942c9b115a91dc03318a5f9e14328c5a71e.zip
Remove pre-2.4 Linux kernel support.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/setgroups.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/setgroups.c54
1 files changed, 1 insertions, 53 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c
index dd74cd2864..73b341ac53 100644
--- a/sysdeps/unix/sysv/linux/i386/setgroups.c
+++ b/sysdeps/unix/sysv/linux/i386/setgroups.c
@@ -1,5 +1,4 @@
-/* Copyright (C) 1997,1998,2000,2002,2004,2006,2011
-   Free Software Foundation, Inc.
+/* Copyright (C) 1997-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -27,16 +26,6 @@
 
 #include <setxid.h>
 #include <linux/posix_types.h>
-#include <kernel-features.h>
-
-
-#ifdef __NR_setgroups32
-# if __ASSUME_32BITUIDS == 0
-/* This variable is shared with all files that need to check for 32bit
-   uids.  */
-extern int __libc_missing_32bit_uids;
-# endif
-#endif /* __NR_setgroups32 */
 
 /* Set the group set for the current user to GROUPS (N of them).  For
    Linux we must convert the array of groups into the format that the
@@ -44,47 +33,6 @@ extern int __libc_missing_32bit_uids;
 int
 setgroups (size_t n, const gid_t *groups)
 {
-#if __ASSUME_32BITUIDS > 0
   return INLINE_SETXID_SYSCALL (setgroups32, 2, n, CHECK_N (groups, n));
-#else
-  if (n > (size_t) __sysconf (_SC_NGROUPS_MAX))
-    {
-      __set_errno (EINVAL);
-      return -1;
-    }
-  else
-    {
-      size_t i;
-      __kernel_gid_t kernel_groups[n];
-
-# ifdef __NR_setgroups32
-      if (__libc_missing_32bit_uids <= 0)
-	{
-	  int result;
-	  int saved_errno = errno;
-
-	  result = INLINE_SETXID_SYSCALL (setgroups32, 2, n,
-					  CHECK_N (groups, n));
-	  if (result == 0 || errno != ENOSYS)
-	    return result;
-
-	  __set_errno (saved_errno);
-	  __libc_missing_32bit_uids = 1;
-	}
-# endif /* __NR_setgroups32 */
-      for (i = 0; i < n; i++)
-	{
-	  kernel_groups[i] = (__ptrvalue (groups))[i];
-	  if (groups[i] != (gid_t) ((__kernel_gid_t) groups[i]))
-	    {
-	      __set_errno (EINVAL);
-	      return -1;
-	    }
-	}
-
-      return INLINE_SETXID_SYSCALL (setgroups, 2, n,
-				    CHECK_N (kernel_groups, n));
-    }
-#endif
 }
 libc_hidden_def (setgroups)