shadow/lib
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
..
.indent.pro [svn-upgrade] Integrating new upstream version, shadow (4.0.8) 2007-10-07 11:46:07 +00:00
commonio.c Fix buffer overflow if NULL line is present in db. 2017-03-31 16:25:06 +02:00
commonio.h Update _COMMONIO_H and _SHADOWIO_H to drop leading underscore 2016-12-21 12:45:50 -06:00
defines.h
encrypt.c Review 52a38d5509 2013-08-04 00:27:53 +02:00
exitcodes.h
faillog.h Make sure every source files are distributed with a copyright and license. 2008-04-27 00:40:09 +00:00
fields.c
fputsx.c * lib/fputsx.c: Compare the result of fgets() with the provided 2009-06-12 20:20:45 +00:00
get_gid.c * libmisc/getgr_nam_gid.c, lib/get_gid.c, lib/get_pid.c, 2009-04-30 21:12:33 +00:00
get_pid.c
get_uid.c
getdef.c Don't crash on bogus keys in login.defs if PAM is enabled 2017-01-29 14:47:24 -06:00
getdef.h
getlong.c
getulong.c Simplify getulong 2016-08-03 11:51:07 -05:00
groupio.c snprintf() always terminates output with \0 2016-11-15 16:05:44 +01:00
groupio.h
groupmem.c Clear passwords on __gr_dup/__pw_dup errors. 2015-07-11 13:00:13 +02:00
gshadow_.h
gshadow.c
lockpw.c
Makefile.am Add backend support for suboridnate uids and gids 2013-08-05 10:08:45 -05:00
nscd.c 2012-02-13 Mike Frysinger <vapier@gentoo.org> 2012-02-13 20:09:59 +00:00
nscd.h
pam_defs.h
port.c
port.h
prototypes.h Make the sp_lstchg shadow field reproducible. 2017-04-10 22:29:21 +01:00
pwauth.c Review 52a38d5509 2013-08-04 00:27:53 +02:00
pwauth.h
pwio.c Create dbs with correct permissions. 2015-02-27 17:01:31 +00:00
pwio.h
pwmem.c Clear passwords on __gr_dup/__pw_dup errors. 2015-07-11 13:00:13 +02:00
selinux.c * lib/selinux.c, lib/semanage.c: prototypes.h was not included. 2012-01-08 16:06:57 +00:00
semanage.c * lib/selinux.c, lib/semanage.c: prototypes.h was not included. 2012-01-08 16:06:57 +00:00
sgetgrent.c
sgetpwent.c
sgetspent.c
sgroupio.c include getdef.h for getdef_bool prototype 2016-12-05 17:15:29 -05:00
sgroupio.h
shadow.c
shadowio.c include getdef.h for getdef_bool prototype 2016-12-05 17:15:29 -05:00
shadowio.h Update _COMMONIO_H and _SHADOWIO_H to drop leading underscore 2016-12-21 12:45:50 -06:00
shadowmem.c Add splint annotations. 2013-08-13 19:13:45 +02:00
spawn.c * lib/prototypes.h, libmisc/cleanup.c, lib/spawn.c, src/chage.c: 2011-10-18 20:23:33 +00:00
subordinateio.c Create dbs with correct permissions. 2015-02-27 17:01:31 +00:00
subordinateio.h Remove dead code. 2013-08-15 17:30:19 +02:00
tcbfuncs.c Reverse comparison for consistency. 2010-03-18 18:58:52 +00:00
tcbfuncs.h
utent.c