nix::unistd

Function setresgid

source
pub fn setresgid(rgid: Gid, egid: Gid, sgid: Gid) -> Result<()>
Expand description

Sets the real, effective, and saved gid. (see setresuid(2))

  • rgid: real group id
  • egid: effective group id
  • sgid: saved group id
  • returns: Ok or libc error code.

Err is returned if the user doesn’t have permission to set this GID.