@@ -66,8 +66,72 @@ __nptl_setxid_sighandler (int sig, siginfo_t *si, void *ctx)
|| si->si_code != SI_TKILL)
return;
- result = INTERNAL_SYSCALL_NCS (xidcmd->syscall_no, 3, xidcmd->id[0],
- xidcmd->id[1], xidcmd->id[2]);
+ switch(xidcmd->syscall_no)
+ {
+#ifdef __NR_setuid32
+ case __NR_setuid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setuid32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setuid32 */
+ case __NR_setuid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setuid, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#ifdef __NR_setreuid32
+ case __NR_setreuid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setreuid32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setreuid32 */
+ case __NR_setreuid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setreuid, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#ifdef __NR_setresgid32
+ case __NR_setresgid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setresgid32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setresgid32 */
+ case __NR_setresgid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setresgid, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#ifdef __NR_setregid32
+ case __NR_setregid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setregid32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setregid32 */
+ case __NR_setregid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setregid, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#ifdef __NR_setgid32
+ case __NR_setgid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgid32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setgid32 */
+ case __NR_setgid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgid, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#ifdef __NR_setgroups32
+ case __NR_setgroups32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgroups32, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+#endif /* __NR_setgroups32 */
+ case __NR_setgroups:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgroups, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ break;
+ default:
+ result = INTERNAL_SYSCALL_NCS (xidcmd->syscall_no, 3, xidcmd->id[0],
+ xidcmd->id[1], xidcmd->id[2]);
+ }
int error = 0;
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
error = INTERNAL_SYSCALL_ERRNO (result);
@@ -262,8 +326,72 @@ __nptl_setxid (struct xid_command *cmdp)
/* 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, 3,
- cmdp->id[0], cmdp->id[1], cmdp->id[2]);
+ switch(cmdp->syscall_no)
+ {
+#ifdef __NR_setuid32
+ case __NR_setuid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setuid32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setuid32 */
+ case __NR_setuid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setuid, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#ifdef __NR_setreuid32
+ case __NR_setreuid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setreuid32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setreuid32 */
+ case __NR_setreuid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setreuid, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#ifdef __NR_setresgid32
+ case __NR_setresgid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setresgid32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setresgid32 */
+ case __NR_setresgid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setresgid, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#ifdef __NR_setregid32
+ case __NR_setregid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setregid32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setregid32 */
+ case __NR_setregid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setregid, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#ifdef __NR_setgid32
+ case __NR_setgid32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgid32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setgid32 */
+ case __NR_setgid:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgid, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#ifdef __NR_setgroups32
+ case __NR_setgroups32:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgroups32, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+#endif /* __NR_setgroups32 */
+ case __NR_setgroups:
+ result = INTERNAL_SYSCALL_NCS (__NR_setgroups, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ break;
+ default:
+ result = INTERNAL_SYSCALL_NCS (cmdp->syscall_no, 3, cmdp->id[0],
+ cmdp->id[1], cmdp->id[2]);
+ }
int error = 0;
if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (result)))
{