diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-10-16 16:33:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-10-16 16:33:36 +0000 |
commit | 9ffbb61221fd5d0ee2b7989d2e5c785efee8cc02 (patch) | |
tree | 5c9b303b79c188e0f33571a09c2975ae8eb0e3ce /sysdeps/unix/sysv/linux/i386/setfsgid.c | |
parent | 39e4f7f84ec269a2d86a060d417ceaeb21f53305 (diff) | |
download | glibc-9ffbb61221fd5d0ee2b7989d2e5c785efee8cc02.tar glibc-9ffbb61221fd5d0ee2b7989d2e5c785efee8cc02.tar.gz glibc-9ffbb61221fd5d0ee2b7989d2e5c785efee8cc02.tar.bz2 glibc-9ffbb61221fd5d0ee2b7989d2e5c785efee8cc02.zip |
Update.
* sysdeps/unix/opendir.c: Use O_DIRECTORY if available. If not
available double check to verify it's a directory.
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h: Add O_DIRECTORY.
* sysdeps/unix/sysv/linux/mips/bits/fcntl: Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl.h: Remove O_* constants which
are not generally available.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: New file.
* sysdeps/unix/sysv/linux/i386/setgroups.c: Add range check for values.
* sysdeps/unix/sysv/linux/arm/Makefile: New file.
* sysdeps/unix/sysv/linux/arm/setegid.c: New file.
* sysdeps/unix/sysv/linux/arm/seteuid.c: New file.
* sysdeps/unix/sysv/linux/arm/setfsgid.c: New file.
* sysdeps/unix/sysv/linux/arm/setfsuid.c: New file.
* sysdeps/unix/sysv/linux/arm/setgid.c: New file.
* sysdeps/unix/sysv/linux/arm/setgroups.c: New file.
* sysdeps/unix/sysv/linux/arm/setresgid.c: New file.
* sysdeps/unix/sysv/linux/arm/setresuid.c: New file.
* sysdeps/unix/sysv/linux/arm/setuid.c: New file.
* sysdeps/unix/sysv/linux/i386/setegid.c: New file.
* sysdeps/unix/sysv/linux/i386/seteuid.c: New file.
* sysdeps/unix/sysv/linux/i386/setfsgid.c: New file.
* sysdeps/unix/sysv/linux/i386/setfsuid.c: New file.
* sysdeps/unix/sysv/linux/i386/setgid.c: New file.
* sysdeps/unix/sysv/linux/i386/setgroups.c: New file.
* sysdeps/unix/sysv/linux/i386/setresgid.c: New file.
* sysdeps/unix/sysv/linux/i386/setresuid.c: New file.
* sysdeps/unix/sysv/linux/i386/setuid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setegid.c: New file.
* sysdeps/unix/sysv/linux/m68k/seteuid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setfsgid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setfsuid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setgid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setgroups.c: New file.
* sysdeps/unix/sysv/linux/m68k/setresgid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setresuid.c: New file.
* sysdeps/unix/sysv/linux/m68k/setuid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setfsgid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setfsuid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file.
* sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c: New file.
* sysdeps/unix/sysv/linux/arm/syscalls.list: Add s_setgid, s_setresuid,
s_setresgid, and s_setuid.
* sysdeps/unix/sysv/linux/i386/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/m68k/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile [subdir=misc]
(sysdep_routines): Add setfsgid, setfsuid, setresgid, and setresuid.
* sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
1998-10-16 Ulrich Drepper <drepper@cygnus.com>
* iconv/skeleton.c: Include ELF header only of STATIC_GCONV is not
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/setfsgid.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/setfsgid.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/setfsgid.c b/sysdeps/unix/sysv/linux/i386/setfsgid.c new file mode 100644 index 0000000000..4af26f554d --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/setfsgid.c @@ -0,0 +1,47 @@ +/* Copyright (C) 1998 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 Library General Public License as + published by the Free Software Foundation; either version 2 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <errno.h> +#include <sys/syscall.h> +#include <sys/types.h> +#include <unistd.h> + +#include <linux/posix_types.h> + +#ifdef __NR_setfsgid +extern int __syscall_setfsgid (__kernel_gid_t); + +int +setfsgid (gid_t gid) +{ + if (gid != (gid_t) ((__kernel_gid_t) gid)) + { + __set_errno (EINVAL); + return -1; + } + + return __syscall_setfsgid (gid); +} +#else +int +setfsgid (gid_t gid) +{ + __set_errno (ENOSYS); + return -1; +} +#endif |