Add sudo command, add effective UID and GID, and groups file
This commit is contained in:
parent
f38426e458
commit
cb5d1fbc58
14 changed files with 214 additions and 40 deletions
|
@ -88,6 +88,14 @@ pub fn getcwd(buf: &mut [u8]) -> Result<usize> {
|
|||
unsafe { syscall2(SYS_GETCWD, buf.as_mut_ptr() as usize, buf.len()) }
|
||||
}
|
||||
|
||||
pub fn getegid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETEGID) }
|
||||
}
|
||||
|
||||
pub fn geteuid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETEUID) }
|
||||
}
|
||||
|
||||
pub fn getgid() -> Result<usize> {
|
||||
unsafe { syscall0(SYS_GETGID) }
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ pub const SYS_EXECVE: usize = 11;
|
|||
pub const SYS_EXIT: usize = 1;
|
||||
pub const SYS_FUTEX: usize = 240;
|
||||
pub const SYS_GETCWD: usize = 183;
|
||||
pub const SYS_GETEGID: usize = 202;
|
||||
pub const SYS_GETEUID: usize = 201;
|
||||
pub const SYS_GETGID: usize = 200;
|
||||
pub const SYS_GETPID: usize = 20;
|
||||
pub const SYS_GETUID: usize = 199;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue