diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-11-12 16:56:15 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-11-12 16:56:15 +0000 |
commit | 8ae4ba1c6d925bdd110d6bbc04f6338065dd56ac (patch) | |
tree | 48c51adddf5da14da5cf924e6c6e6e946eaea57f /nptl/allocatestack.c | |
parent | 9abf55c24c31a53d987ebf53e46cbd64eab417bc (diff) | |
download | glibc-8ae4ba1c6d925bdd110d6bbc04f6338065dd56ac.tar.gz glibc-8ae4ba1c6d925bdd110d6bbc04f6338065dd56ac.tar.xz glibc-8ae4ba1c6d925bdd110d6bbc04f6338065dd56ac.zip |
Updated to fedora-glibc-20041112T1640
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)) |