Chris Lamb cb610d54b4 Make the sp_lstchg shadow field reproducible.
The third field in the /etc/shadow file (sp_lstchg) contains the date of
the last password change expressed as the number of days since Jan 1, 1970.
As this is a relative time, creating a user today will result in:

   username:17238:0:99999:7:::

whilst creating the same user tomorrow will result in:

    username:17239:0:99999:7:::

This has an impact for the Reproducible Builds[0] project where we aim to
be independent of as many elements the build environment as possible,
including the current date.

This patch changes the behaviour to use the SOURCE_DATE_EPOCH[1]
environment variable (instead of Jan 1, 1970) if valid.

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Chris Lamb <lamby@debian.org>
2017-04-10 22:29:21 +01:00
..
2011-09-18 20:44:09 +00:00
2016-08-03 11:51:07 -05:00
2015-02-27 17:01:31 +00:00
2009-03-21 20:45:35 +00:00
2013-08-13 19:13:45 +02:00
2013-08-15 17:30:19 +02:00
2010-03-18 18:58:52 +00:00
2010-03-18 19:23:00 +00:00