Function nc::setuid

source ·
pub unsafe fn setuid(uid: uid_t) -> Result<(), Errno>
Expand description

Set user ID of the calling process to uid.

§Example

let ret = unsafe { nc::setuid(0) };
assert_eq!(ret, Err(nc::EPERM));