[Pkg-shadow-devel] Bug#857803: shadow: Make the sp_lstchg shadow field reproducible.

Chris Lamb lamby at debian.org
Wed Mar 15 10:36:21 UTC 2017


Package: shadow
Severity: wishlist
Version: 1:4.4-4
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Attached is the following:

  commit 2dd84b0ee31e44dc51cba7b7cdc8657bf9ff0a31
  Author: Chris Lamb <lamby at debian.org>
  Date:   Wed Mar 15 11:35:35 2017 +0100
  
      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 available.
      
       [0] https://reproducible-builds.org/
       [1] https://reproducible-builds.org/specs/source-date-epoch/
      
      Signed-off-by: Chris Lamb <lamby at debian.org>
  
   lib/prototypes.h    |  3 ++
   libmisc/Makefile.am |  1 +
   libmisc/gettime.c   | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++
   src/chpasswd.c      |  2 +-
   src/newusers.c      |  4 +--
   src/passwd.c        |  2 +-
   src/useradd.c       |  2 +-
   src/usermod.c       |  4 +--
   8 files changed, 97 insertions(+), 7 deletions(-)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-the-sp_lstchg-shadow-field-reproducible.patch
Type: text/x-diff
Size: 8389 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20170315/525d406f/attachment.patch>


More information about the Pkg-shadow-devel mailing list