From: Serge Hallyn Date: Mon, 23 Aug 2021 01:30:37 +0000 (-0500) Subject: add shadow entry struct X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ae2855fdd220da240f03946e7da8a81ed169deb;p=thirdparty%2Fshadow.git add shadow entry struct Signed-off-by: Serge Hallyn --- diff --git a/src/bin/passwd.rs b/src/bin/passwd.rs index f0d710590..49caac939 100644 --- a/src/bin/passwd.rs +++ b/src/bin/passwd.rs @@ -60,6 +60,18 @@ struct Opts { login: Option, } +struct Shadow_entry { + sp_namp: String, // Login name + sp_pwdp: String, // Hashed passphrase + sp_lstchg: i64, // Date of last change + sp_min: i64, // Minimum number of days between changes + sp_max: i64, // Maximum number of days between changes + sp_warn: i64, // Number of days to warn user to change the password + sp_inact: i64, // Number of days the account may be inactive + sp_expire: i64, // Number of days since 1970-01-01 until account expires + sp_flag: u64, // Reserved +} + fn do_chroot(newroot: &Path) -> anyhow::Result<()> { if !newroot.is_absolute() { bail!("{:?} is not an absolute path", newroot)