diff options
| author | Ulrich Drepper <drepper@redhat.com> | 2004-09-20 00:16:11 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 2004-09-20 00:16:11 +0000 |
| commit | 2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6 (patch) | |
| tree | eb3ba83120d92a0ea9955520f2df4e00a22bc884 | |
| parent | 29e11320c90722aec6335a5f8d8af84d12ba3c6b (diff) | |
| download | glibc-2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6.tar.xz glibc-2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6.zip | |
Update.
* sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call
callback to set IDs in all other threads as well.
* sysdeps/unix/sysv/linux/seteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setegid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setgid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
* sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise.
* sysdeps/unix/sysv/linux/setuid.c: New file.
* sysdeps/unix/sysv/linux/setgid.c: New file.
* sysdeps/unix/sysv/linux/setreuid.c: New file.
* sysdeps/unix/sysv/linux/setregid.c: New file.
* sysdeps/unix/sysv/linux/setresuid.c: New file.
* sysdeps/unix/sysv/linux/setresgid.c: New file.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS.
* sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version.
* sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise.
* 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/syscalls.list: Remove setresgid
and setresuid.
* nscd/aicache.c: Use pthread_seteuid_np instead of seteuid.
* nscd/grpcache.c: Likewise.
* nscd/hstcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
62 files changed, 1252 insertions, 233 deletions
@@ -1,5 +1,38 @@ 2004-09-19 Ulrich Drepper <drepper@redhat.com> + * sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call + callback to set IDs in all other threads as well. + * sysdeps/unix/sysv/linux/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/setuid.c: New file. + * sysdeps/unix/sysv/linux/setgid.c: New file. + * sysdeps/unix/sysv/linux/setreuid.c: New file. + * sysdeps/unix/sysv/linux/setregid.c: New file. + * sysdeps/unix/sysv/linux/setresuid.c: New file. + * sysdeps/unix/sysv/linux/setresgid.c: New file. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS. + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version. + * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. + * 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/syscalls.list: Remove setresgid + and setresuid. + * nscd/aicache.c: Use pthread_seteuid_np instead of seteuid. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + * resolv/res_mkquery.c (res_nmkquery): Fix typo. 2004-09-18 Ulrich Drepper <drepper@redhat.com> diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index e31fd400e5..4a107da62a 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,25 @@ +2004-09-19 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/pthread/pthread.h: Declare pthread_setgid_np, + pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np, + pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np, + and pthread_setresuid_np. + * pthread_setgid_np.c: New file. + * pthread_setuid_np.c: New file. + * pthread_setegid_np.c: New file. + * pthread_seteuid_np.c: New file. + * pthread_setregid_np.c: New file. + * pthread_setreuid_np.c: New file. + * pthread_setresgid_np.c: New file. + * pthread_setresuid_np.c: New file. + * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np, + pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np, + pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np, + and pthread_setresuid_np. + * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid, + pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid, + pthread_setregid, and pthread_setresgid. + 2004-09-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/pthread.h: Make rwlock prototypes available also diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile index 926de32913..79d412df91 100644 --- a/linuxthreads/Makefile +++ b/linuxthreads/Makefile @@ -51,7 +51,11 @@ libpthread-routines := attr cancel condvar join manager mutex ptfork \ ptw-open ptw-open64 ptw-pause ptw-pread ptw-pread64 \ ptw-pwrite ptw-pwrite64 ptw-tcdrain ptw-wait \ ptw-waitpid pt-system old_pthread_atfork pthread_atfork \ - ptcleanup + ptcleanup \ + pthread_setuid pthread_seteuid pthread_setreuid \ + pthread_setresuid \ + pthread_setgid pthread_setegid pthread_setregid \ + pthread_setresgid # Don't generate deps for calls with no sources. See sysdeps/unix/Makefile. omit-deps = $(unix-syscalls:%=ptw-%) diff --git a/linuxthreads/Versions b/linuxthreads/Versions index b9de1612c3..51896974e5 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -172,6 +172,12 @@ libpthread { pthread_cond_wait; pthread_cond_timedwait; pthread_cond_signal; pthread_cond_broadcast; } + GLIBC_2.3.4 { + pthread_setuid_np; pthread_seteuid_np; pthread_setreuid_np; + pthread_setresuid_np; + pthread_setgid_np; pthread_setegid_np; pthread_setregid_np; + pthread_setresgid_np; + } GLIBC_PRIVATE { # Internal libc interface to libpthread __pthread_initialize; diff --git a/linuxthreads/pthread_setegid.c b/linuxthreads/pthread_setegid.c new file mode 100644 index 0000000000..9e16828fa5 --- /dev/null +++ b/linuxthreads/pthread_setegid.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2004 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <pthread.h> +#include <unistd.h> + + +int +pthread_setegid_np (gid_t gid) +{ + return setegid (gid); +} diff --git a/linuxthreads/pthread_seteuid.c b/linuxthreads/pthread_seteuid.c new file mode 100644 index 0000000000..9d29d81118 --- /dev/null +++ b/linuxthreads/pthread_seteuid.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2004 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, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <pthread.h> +#include <unistd.h> + + +int +pthread_seteuid_np (uid_t uid) +{ + return seteuid (uid); +} diff --git a/linuxthreads/pthread_setgid.c b/linuxthreads/pthread_setgid.c new file mode 100644 index 0000000000..db37dd1465 --- /dev/null +++ b/linuxthreads/pthread_setgid.c @@ -0,0 +1,27 @@ +/* Copyright (C) 2004 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 publi |
