aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-20 00:16:11 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-20 00:16:11 +0000
commit2edb61e3f955bfcc9dd3cb6b3b1acfe4806234a6 (patch)
treeeb3ba83120d92a0ea9955520f2df4e00a22bc884
parent29e11320c90722aec6335a5f8d8af84d12ba3c6b (diff)
downloadglibc-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.
-rw-r--r--ChangeLog33
-rw-r--r--linuxthreads/ChangeLog22
-rw-r--r--linuxthreads/Makefile6
-rw-r--r--linuxthreads/Versions6
-rw-r--r--linuxthreads/pthread_setegid.c27
-rw-r--r--linuxthreads/pthread_seteuid.c27
-rw-r--r--linuxthreads/pthread_setgid.c27
-rw-r--r--linuxthreads/pthread_setregid.c27
-rw-r--r--linuxthreads/pthread_setresgid.c27
-rw-r--r--linuxthreads/pthread_setresuid.c27
-rw-r--r--linuxthreads/pthread_setreuid.c27
-rw-r--r--linuxthreads/pthread_setuid.c27
-rw-r--r--linuxthreads/sysdeps/pthread/pthread.h30
-rw-r--r--nptl/ChangeLog34
-rw-r--r--nptl/Makefile6
-rw-r--r--nptl/Versions5
-rw-r--r--nptl/allocatestack.c81
-rw-r--r--nptl/descr.h10
-rw-r--r--nptl/init.c40
-rw-r--r--nptl/pt-allocrtsig.c7
-rw-r--r--nptl/pthreadP.h9
-rw-r--r--nptl/pthread_setegid.c3
-rw-r--r--nptl/pthread_seteuid.c3
-rw-r--r--nptl/pthread_setgid.c3
-rw-r--r--nptl/pthread_setregid.c3
-rw-r--r--nptl/pthread_setresgid.c3
-rw-r--r--nptl/pthread_setresuid.c3
-rw-r--r--nptl/pthread_setreuid.c3
-rw-r--r--nptl/pthread_setuid.c3
-rw-r--r--nptl/sysdeps/pthread/pthread-functions.h2
-rw-r--r--nptl/sysdeps/pthread/pthread.h30
-rw-r--r--nptl/sysdeps/unix/sysv/linux/allocrtsig.c4
-rw-r--r--nscd/aicache.c4
-rw-r--r--nscd/grpcache.c4
-rw-r--r--nscd/hstcache.c4
-rw-r--r--nscd/pwdcache.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/setegid.c28
-rw-r--r--sysdeps/unix/sysv/linux/i386/seteuid.c28
-rw-r--r--sysdeps/unix/sysv/linux/i386/setgid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/setregid.c32
-rw-r--r--sysdeps/unix/sysv/linux/i386/setresgid.c34
-rw-r--r--sysdeps/unix/sysv/linux/i386/setresuid.c34
-rw-r--r--sysdeps/unix/sysv/linux/i386/setreuid.c32
-rw-r--r--sysdeps/unix/sysv/linux/i386/setuid.c33
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h42
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.h46
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h30
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h30
-rw-r--r--sysdeps/unix/sysv/linux/setegid.c28
-rw-r--r--sysdeps/unix/sysv/linux/seteuid.c30
-rw-r--r--sysdeps/unix/sysv/linux/setgid.c53
-rw-r--r--sysdeps/unix/sysv/linux/setregid.c53
-rw-r--r--sysdeps/unix/sysv/linux/setresgid.c54
-rw-r--r--sysdeps/unix/sysv/linux/setresuid.c54
-rw-r--r--sysdeps/unix/sysv/linux/setreuid.c53
-rw-r--r--sysdeps/unix/sysv/linux/setuid.c52
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c55
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c57
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep.h9
62 files changed, 1252 insertions, 233 deletions
diff --git a/ChangeLog b/ChangeLog
index f847079669..768ae143c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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