Using thread-specific credentials on Linux in Samba with glibc.

Jeremy Allison jra@samba.org
Mon Jul 2 22:16:00 GMT 2012


On Mon, Jul 02, 2012 at 03:10:53PM -0700, Roland McGrath wrote:
> > Just to make things extremely clear, what we're hoping for is
> > an acknowlegement from the glibc maintainers that using syscall()
> > in this way to get per-process thread credentials on Linux
> > platforms is allowed by glibc, in that if it gets accidently
> > broken in future by glibc changes (as can happen with any
> > software of course :-) then it would be considered a bug.
> 
> The context remains utterly muddy and we are not going to read a giant
> thread to tease out what you are asking.  Show us an example of a use of
> the syscall function that you are seeking a clarification on the validity of.

Sure, no problem. I want to be able to use this function:

----------------------------------------------------------
int samba_setresuid(uid_t ruid, uid_t euid, uid_t suid)
{
        return syscall(SYS_setresuid, ruid, euid, suid);
}
----------------------------------------------------------

to continue to set a credential on the current Linux thread
(which it currently does), not the whole POSIX process,
and for glibc to allow such use in the future.

Jeremy.



More information about the Libc-alpha mailing list