pub fn set_thread_uid(uid: Uid) -> Result<()>
Available on crate feature
thread
only.Expand description
setuid(uid)
—Sets the effective user ID of the calling thread.
§Warning
This is not the setuid
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. This call implements the kernel behavior.