1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-31 04:57:45 +00:00

Merge pull request #753 from ebfe/fix-id

id: fix '-u'
This commit is contained in:
Heather 2015-12-21 14:55:40 +04:00
commit 2c095f79b0

View file

@ -141,9 +141,9 @@ pub fn uumain(args: Vec<String>) -> i32 {
let id = if possible_pw.is_some() {
possible_pw.unwrap().pw_uid
} else if rflag {
unsafe { getgid() }
unsafe { getuid() }
} else {
unsafe { getegid() }
unsafe { geteuid() }
};
let pw = unsafe { getpwuid(id) };