Add permissions to the filesystem, preliminary permissions to the syscalls
This commit is contained in:
parent
478bc20b85
commit
f4a1d06f07
19 changed files with 142 additions and 20 deletions
11
programs/id/src/main.rs
Normal file
11
programs/id/src/main.rs
Normal file
|
@ -0,0 +1,11 @@
|
|||
#![feature(question_mark)]
|
||||
|
||||
extern crate syscall;
|
||||
|
||||
use std::env;
|
||||
|
||||
pub fn main() {
|
||||
let uid = syscall::getuid().expect("id: failed to get UID");
|
||||
let gid = syscall::getgid().expect("id: failed to get GID");
|
||||
println!("uid={}({}) gid={}({})", uid, env::var("USER").unwrap_or(String::new()), gid, "");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue