diff options
author | Joseph Myers <joseph@codesourcery.com> | 2014-10-24 13:01:17 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2014-10-24 13:01:17 +0000 |
commit | c8bc40386ad9767e1e4de882182b91ae57ca211c (patch) | |
tree | 4240d5071566091d930e233aaba3db3261e765cd /sysdeps/unix/sysv/linux/i386 | |
parent | 48eb7a94e292efcbbd74902322252a99cbf74fb9 (diff) | |
download | glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.tar glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.tar.gz glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.tar.bz2 glibc-c8bc40386ad9767e1e4de882182b91ae57ca211c.zip |
Move get*id and getgroups definitions to syscalls.list (bug 14138).
Continuing the move of syscall definitions to syscalls.list, where the
removal of support for old kernel versions has made this possible,
this patch moves various definitions of get*id functions and
getgroups. The previous C definitions were because of the transition
to 32-bit uids and gids.
Tested for x86.
[BZ #14138]
* sysdeps/unix/sysv/linux/arm/getegid.c: Remove file.
* sysdeps/unix/sysv/linux/arm/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/m68k/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getresgid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getresuid.c: Likewise.
* sysdeps/unix/sysv/linux/sh/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getegid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/geteuid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getgid.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getgroups.c: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/getuid.c: Likewise.
* sysdeps/unix/sysv/linux/arm/syscalls.list (getegid): Add
syscall.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/i386/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/m68k/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/syscalls.list (getegid):
Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/sh/syscalls.list (getegid): Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getresgid): Likewise.
(getresuid): Likewise.
(getgroups): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list (getegid):
Likewise.
(geteuid): Likewise.
(getgid): Likewise.
(getuid): Likewise.
(getgroups): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getegid.c | 33 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/geteuid.c | 33 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getgid.c | 33 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getgroups.c | 39 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getresgid.c | 35 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getresuid.c | 35 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/getuid.c | 33 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/syscalls.list | 8 |
8 files changed, 8 insertions, 241 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/getegid.c b/sysdeps/unix/sysv/linux/i386/getegid.c deleted file mode 100644 index ec56bfbcf9..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getegid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -gid_t -__getegid (void) -{ - INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (getegid32, err, 0); -} - -weak_alias (__getegid, getegid) diff --git a/sysdeps/unix/sysv/linux/i386/geteuid.c b/sysdeps/unix/sysv/linux/i386/geteuid.c deleted file mode 100644 index c4e794ab23..0000000000 --- a/sysdeps/unix/sysv/linux/i386/geteuid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -uid_t -__geteuid (void) -{ - INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (geteuid32, err, 0); -} - -weak_alias (__geteuid, geteuid) diff --git a/sysdeps/unix/sysv/linux/i386/getgid.c b/sysdeps/unix/sysv/linux/i386/getgid.c deleted file mode 100644 index 6ef073bb1a..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getgid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -gid_t -__getgid (void) -{ - INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (getgid32, err, 0); -} - -weak_alias (__getgid, getgid) diff --git a/sysdeps/unix/sysv/linux/i386/getgroups.c b/sysdeps/unix/sysv/linux/i386/getgroups.c deleted file mode 100644 index 556fffacda..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getgroups.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (C) 1997-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> -#include <sys/param.h> -#include <sys/types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -#include <linux/posix_types.h> - - -/* Consider moving to syscalls.list. */ - -/* For Linux we must convert the array of groups from the format that the - kernel returns. */ -int -__getgroups (int n, gid_t *groups) -{ - return INLINE_SYSCALL (getgroups32, 2, n, groups); -} - -weak_alias (__getgroups, getgroups) diff --git a/sysdeps/unix/sysv/linux/i386/getresgid.c b/sysdeps/unix/sysv/linux/i386/getresgid.c deleted file mode 100644 index f1fca1e755..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getresgid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> -#include <sys/types.h> - -#include <linux/posix_types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -int -__getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid) -{ - return INLINE_SYSCALL (getresgid32, 3, rgid, egid, sgid); -} -libc_hidden_def (__getresgid) -weak_alias (__getresgid, getresgid) diff --git a/sysdeps/unix/sysv/linux/i386/getresuid.c b/sysdeps/unix/sysv/linux/i386/getresuid.c deleted file mode 100644 index fff076c0ba..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getresuid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> -#include <sys/types.h> - -#include <linux/posix_types.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -int -__getresuid (uid_t *ruid, uid_t *euid, uid_t *suid) -{ - return INLINE_SYSCALL (getresuid32, 3, ruid, euid, suid); -} -libc_hidden_def (__getresuid) -weak_alias (__getresuid, getresuid) diff --git a/sysdeps/unix/sysv/linux/i386/getuid.c b/sysdeps/unix/sysv/linux/i386/getuid.c deleted file mode 100644 index 60e24cc50d..0000000000 --- a/sysdeps/unix/sysv/linux/i386/getuid.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000-2014 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep.h> -#include <sys/syscall.h> - -/* Consider moving to syscalls.list. */ - -uid_t -__getuid (void) -{ - INTERNAL_SYSCALL_DECL (err); - return INTERNAL_SYSCALL (getuid32, err, 0); -} - -weak_alias (__getuid, getuid) diff --git a/sysdeps/unix/sysv/linux/i386/syscalls.list b/sysdeps/unix/sysv/linux/i386/syscalls.list index db375a8b6b..f487c67de5 100644 --- a/sysdeps/unix/sysv/linux/i386/syscalls.list +++ b/sysdeps/unix/sysv/linux/i386/syscalls.list @@ -4,6 +4,14 @@ chown - chown32 i:sii __chown chown@@GLIBC_2.1 lchown - lchown32 i:sii __lchown lchown@@GLIBC_2.0 chown@GLIBC_2.0 fchown - fchown32 i:iii __fchown fchown +getegid - getegid32 Ei: __getegid getegid +geteuid - geteuid32 Ei: __geteuid geteuid +getgid - getgid32 Ei: __getgid getgid +getuid - getuid32 Ei: __getuid getuid +getresgid - getresgid32 i:ppp __getresgid getresgid +getresuid - getresuid32 i:ppp __getresuid getresuid +getgroups - getgroups32 i:ip __getgroups getgroups + modify_ldt EXTRA modify_ldt i:ipi __modify_ldt modify_ldt vm86old EXTRA vm86old i:p __vm86old vm86@GLIBC_2.0 vm86 - vm86 i:ip __vm86 vm86@@GLIBC_2.3.4 |