Merge pull request #146 from lamby/reproducible-shadow-files
Make the sp_lstchg shadow field reproducible (re. #71)
This commit is contained in:
@@ -609,7 +609,7 @@ static void check_pw_file (int *errors, bool *changed)
|
||||
sp.sp_inact = -1;
|
||||
sp.sp_expire = -1;
|
||||
sp.sp_flag = SHADOW_SP_FLAG_UNSET;
|
||||
sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
|
||||
sp.sp_lstchg = (long) gettime () / SCALE;
|
||||
if (0 == sp.sp_lstchg) {
|
||||
/* Better disable aging than
|
||||
* requiring a password change
|
||||
|
||||
@@ -267,7 +267,7 @@ int main (int argc, char **argv)
|
||||
spent.sp_flag = SHADOW_SP_FLAG_UNSET;
|
||||
}
|
||||
spent.sp_pwdp = pw->pw_passwd;
|
||||
spent.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
|
||||
spent.sp_lstchg = (long) gettime () / SCALE;
|
||||
if (0 == spent.sp_lstchg) {
|
||||
/* Better disable aging than requiring a password
|
||||
* change */
|
||||
|
||||
Reference in New Issue
Block a user