[go: up one dir, main page]

Function users::switch::set_current_uid

source ·
pub fn set_current_uid(uid: uid_t) -> IOResult<()>
Expand description

Sets the current user for the running process to the one with the given user ID. Uses setuid internally.

Typically, trying to switch to anyone other than the user already running the process requires root privileges.