pub fn set_thread_res_uid(ruid: Uid, euid: Uid, suid: Uid) -> Result<()>Expand description
setresuid(ruid, euid, suid)—Sets the real, effective, and saved user ID
of the calling thread.
§Warning
This is not the setresuid you are looking for… POSIX requires uids to be
process granular, but on Linux they are per-thread. Thus, this call only
changes the uid for the current thread, not the entire process even
though that is in violation of the POSIX standard.
For details on this distinction, see the C library vs. kernel differences
in the manual page and the notes in set_thread_uid. This
call implements the kernel behavior.