Merge pull request #2 from xTibor/implement_whoami

Implement whoami
This commit is contained in:
Jeremy Soller
2017-01-15 21:19:50 -07:00
committed by GitHub
3 changed files with 10 additions and 0 deletions
+4
View File
@@ -26,6 +26,10 @@ path = "src/bin/su.rs"
name = "sudo"
path = "src/bin/sudo.rs"
[[bin]]
name = "whoami"
path = "src/bin/whoami.rs"
[dependencies]
argon2rs = { version = "0.2", default-features = false }
liner = "0.1"
+1
View File
@@ -10,3 +10,4 @@ This repository contains utilities for user and group management for Redox. Addi
- `id`
- `login`
- `sudo`
- `whoami`
+5
View File
@@ -0,0 +1,5 @@
use std::env;
pub fn main() {
println!("{}", env::var("USER").unwrap_or(String::new()));
}