On 07/18/2018 08:33 AM, Christoph Hellwig wrote: >> - if (syscall(SYS_setresgid, pw->pw_gid, pw->pw_gid, pw->pw_gid) != 0) { >> +#ifdef __NR_setresuid32 >> + res = syscall(SYS_setresgid32, pw->pw_gid, pw->pw_gid, pw->pw_gid); >> +#else >> + res = syscall(SYS_setresgid, pw->pw_gid, pw->pw_gid, pw->pw_gid); >> +#endif > > I think you want to simply call setresuid/setresgid from glibcs, which > will do the right thing instead of doing hand crafted syscalls. Here is the comment above these calls /* Switch the UIDs and GIDs. */ /* For the threaded version we have to set uid,gid per thread instead * of per process. glibc setresuid() when called from a thread, it'll * send a signal to all other threads to synchronize the uid in all * other threads. To bypass this, we have to call syscall() directly. */ steved. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html