Module users::switch [] [src]

Functions for switching the running process’s user or group.

Structs

SwitchUserGuard

Guard returned from a switch_user_group call.

Functions

set_both_gid

Sets both the current group and the effective group for the running process to the ones with the given group IDs. Uses setregid internally.

set_both_uid

Sets both the current user and the effective user for the running process to the ones with the given user IDs. Uses setreuid internally.

set_current_gid

Sets the current group for the running process to the one with the given group ID. Uses setgid internally.

set_current_uid

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

set_effective_gid

Sets the effective group for the running process to the one with the given group ID. Uses setegid internally.

set_effective_uid

Sets the effective user for the running process to the one with the given user ID. Uses seteuid internally.

switch_user_group

Sets the effective user and the effective group for the current scope.