]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
add shadow entry struct
authorSerge Hallyn <serge@hallyn.com>
Mon, 23 Aug 2021 01:30:37 +0000 (20:30 -0500)
committerSerge Hallyn <serge@hallyn.com>
Mon, 23 Aug 2021 01:30:37 +0000 (20:30 -0500)
Signed-off-by: Serge Hallyn <serge@hallyn.com>
src/bin/passwd.rs

index f0d710590a856cf9d6dc2d15f7139cbe42930432..49caac93996634370d1d24f806f951c909a72a7a 100644 (file)
@@ -60,6 +60,18 @@ struct Opts {
     login: Option<String>,
 }
 
+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)