diff --git a/Cargo.toml b/Cargo.toml index 0825d75..aabebc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "redox_syscall" -version = "0.1.6" +version = "0.1.7" description = "A Rust library to access raw Redox system calls" license = "MIT" authors = ["Jeremy Soller "] diff --git a/src/call.rs b/src/call.rs index a2a00a8..c75fd9f 100644 --- a/src/call.rs +++ b/src/call.rs @@ -216,14 +216,14 @@ pub fn rmdir(path: &str) -> Result { unsafe { syscall2(SYS_RMDIR, path.as_ptr() as usize, path.len()) } } -/// Set the current process group ID -pub fn setgid(gid: usize) -> Result { - unsafe { syscall1(SYS_SETGID, gid) } +/// Set the current process group IDs +pub fn setregid(rgid: usize, egid: usize) -> Result { + unsafe { syscall2(SYS_SETREGID, rgid, egid) } } -/// Set the current process user ID -pub fn setuid(uid: usize) -> Result { - unsafe { syscall1(SYS_SETUID, uid) } +/// Set the current process user IDs +pub fn setreuid(ruid: usize, euid: usize) -> Result { + unsafe { syscall2(SYS_SETREUID, ruid, euid) } } /// Create and set a new scheme namespace diff --git a/src/number.rs b/src/number.rs index cab0cf4..4f496fe 100644 --- a/src/number.rs +++ b/src/number.rs @@ -53,8 +53,8 @@ pub const SYS_PHYSMAP: usize = 947; pub const SYS_PHYSUNMAP: usize =948; pub const SYS_VIRTTOPHYS: usize=949; pub const SYS_PIPE2: usize = 331; -pub const SYS_SETGID: usize = 214; -pub const SYS_SETUID: usize = 213; +pub const SYS_SETREGID: usize = 204; +pub const SYS_SETREUID: usize = 203; pub const SYS_SETNS: usize = 310; pub const SYS_WAITPID: usize = 7; pub const SYS_YIELD: usize = 158;