mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
commit
50d571717b
1 changed files with 2 additions and 2 deletions
4
id/id.rs
4
id/id.rs
|
@ -260,7 +260,7 @@ fn pretty(possible_pw: Option<c_passwd>) {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
fn pline(possible_pw: Option<c_passwd>) {
|
fn pline(possible_pw: Option<c_passwd>) {
|
||||||
let pw = if possible_pw.is_none() {
|
let pw = if possible_pw.is_none() {
|
||||||
unsafe { read(getpwuid(getuid() as i32)) }
|
unsafe { read(getpwuid(getuid())) }
|
||||||
} else {
|
} else {
|
||||||
possible_pw.unwrap()
|
possible_pw.unwrap()
|
||||||
};
|
};
|
||||||
|
@ -273,7 +273,7 @@ fn pline(possible_pw: Option<c_passwd>) {
|
||||||
let pw_shell = unsafe { from_c_str(pw.pw_shell) };
|
let pw_shell = unsafe { from_c_str(pw.pw_shell) };
|
||||||
|
|
||||||
println!(
|
println!(
|
||||||
"{:s}:{:s}:{:d}:{:d}:{:s}:{:d}:{:d}:{:s}:{:s}:{:s}",
|
"{:s}:{:s}:{:u}:{:u}:{:s}:{:d}:{:d}:{:s}:{:s}:{:s}",
|
||||||
pw_name,
|
pw_name,
|
||||||
pw_passwd,
|
pw_passwd,
|
||||||
pw.pw_uid,
|
pw.pw_uid,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue