Skip to main content

krun_setgid

Function krun_setgid 

Source
pub unsafe extern "C" fn krun_setgid(ctx_id: u32, gid: gid_t) -> i32
Expand description

Configures gid 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. “gid” - a group id to be set.

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