|
|
@ -39,6 +39,7 @@ pub fn get_users() -> std::vec::Vec<Passwd> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let _lock = MUTEX.lock().expect("poisoned");
|
|
|
|
let _lock = MUTEX.lock().expect("poisoned");
|
|
|
|
|
|
|
|
let _end = PhantomDrop::new((), |_| endpwent());
|
|
|
|
loop {
|
|
|
|
loop {
|
|
|
|
let passwd = getpwent();
|
|
|
|
let passwd = getpwent();
|
|
|
|
|
|
|
|
|
|
|
@ -55,8 +56,8 @@ pub fn get_users() -> std::vec::Vec<Passwd> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
users.push(Passwd{
|
|
|
|
users.push(Passwd{
|
|
|
|
gid: 1,
|
|
|
|
gid: my_passwd.pw_gid,
|
|
|
|
uid: 2,
|
|
|
|
uid: my_passwd.pw_uid,
|
|
|
|
home: from_cstr!(
|
|
|
|
home: from_cstr!(
|
|
|
|
my_passwd.pw_dir,
|
|
|
|
my_passwd.pw_dir,
|
|
|
|
"User {}'s home ({}) has invalid UTF-8 characters, skipping",
|
|
|
|
"User {}'s home ({}) has invalid UTF-8 characters, skipping",
|
|
|
@ -70,7 +71,6 @@ pub fn get_users() -> std::vec::Vec<Passwd> {
|
|
|
|
name
|
|
|
|
name
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
endpwent();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return users;
|
|
|
|
return users;
|
|
|
|
}
|
|
|
|
}
|
|
|
|