Skip to main content

krun_setuid

Function krun_setuid 

Source
pub unsafe extern "C" fn krun_setuid(ctx_id: u32, uid: uid_t) -> i32
Expand description

Configures uid which is set right before the microVM is started.

This is useful for example when you want to access host block devices from the microVM which requires root privileges when opening the device but you don’t want to run the whole microVM as root.

Arguments: “ctx_id” - the configuration context ID. “uid” - a user id to be set.

Returns: Zero on success or a negative error number on failure.