From 21708942c9b115a91dc03318a5f9e14328c5a71e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 25 May 2012 19:19:30 +0000 Subject: Remove pre-2.4 Linux kernel support. --- sysdeps/unix/sysv/linux/i386/setgroups.c | 54 +------------------------------- 1 file changed, 1 insertion(+), 53 deletions(-) (limited to 'sysdeps/unix/sysv/linux/i386/setgroups.c') diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c index dd74cd2..73b341a 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 #include -#include - - -#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) -- cgit v1.1