[PATCH] Linux: Implement per-thread user and group IDs

Florian Weimer fweimer@redhat.com
Fri Jun 28 19:06:00 GMT 2019


* Florian Weimer:

> This commit adds the functions pthread_attr_setperthreadids_np and
> pthread_attr_getperthreadids_np.  Threads created with the new flag
> will be exempted from the setxid broadcast.  setuid and related
> functions will only update the credentials for the current thread.
>
> Multi-threaded file servers typically need this functionality and
> call the system calls directly to implement this.
>
> (Build-tested on all architectures with build-many-glibcs.py.
> Run-time-tested on x86-64, by running the new xtest as root.  I still
> need to implement the inheritance test Carlos requested.  Due to the
> similarities, I plan to write one separate test for both kinds of
> properties.)

I should have added that the core implementation is unchanged from the
one I posted in December 2018, only the interfaces were aligned with the
perthreadfs patch.

Thanks,
Florian



More information about the Libc-alpha mailing list