diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-11-12 01:27:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-11-12 01:27:04 +0000 |
commit | ccd8de9aa69df004a3df02333fb01f4eaf990d92 (patch) | |
tree | 92140798bd1d370d672b9eb4892f485461d693cb /nptl/allocatestack.c | |
parent | 85bd63313720ed5e7f10427ec5f0d2f59ee23614 (diff) | |
download | glibc-ccd8de9aa69df004a3df02333fb01f4eaf990d92.tar.gz glibc-ccd8de9aa69df004a3df02333fb01f4eaf990d92.tar.xz glibc-ccd8de9aa69df004a3df02333fb01f4eaf990d92.zip |
Update.
2004-11-10 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/setreuid.c: Remove sys/syscall.h, sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded snippets. * sysdeps/unix/sysv/linux/setegid.c: Likewise. * sysdeps/unix/sysv/linux/setuid.c: Likewise. * sysdeps/unix/sysv/linux/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/setgid.c: Likewise. * sysdeps/unix/sysv/linux/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/setregid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setreuid.c: Likewise. Formatting. Change signed int into int. * sysdeps/unix/sysv/linux/alpha/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/alpha/setregid.c: Likewise. * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): Remove. * sysdeps/unix/setxid.h: New file. * Rules (binaries-static): Add xtests-static. * Makeconfig (run-program-prefix): Filter also xtests-static.
Diffstat (limited to 'nptl/allocatestack.c')
-rw-r--r-- | nptl/allocatestack.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c index d4f3188f53..6c2367cc89 100644 --- a/nptl/allocatestack.c +++ b/nptl/allocatestack.c @@ -816,10 +816,11 @@ __find_thread_by_id (pid_t tid) } #endif -void +int attribute_hidden __nptl_setxid (struct xid_command *cmdp) { + int result; lll_lock (stack_cache_lock); __xidcmd = cmdp; @@ -891,7 +892,18 @@ __nptl_setxid (struct xid_command *cmdp) cur = cmdp->cntr; } + /* This must be last, otherwise the current thread might not have + permissions to send SIGSETXID syscall to the other threads. */ + result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, err, 3, + cmdp->id[0], cmdp->id[1], cmdp->id[2]); + if (INTERNAL_SYSCALL_ERROR_P (result, err)) + { + __set_errno (INTERNAL_SYSCALL_ERRNO (result, err)); + result = -1; + } + lll_unlock (stack_cache_lock); + return result; } static inline void __attribute__((always_inline)) |