The Samba-Bugzilla – Bug 13805
pam_windbind miscalculates password expiry times around daylight savings changes
Last modified: 2019-02-27 08:49:58 UTC
This is picked up in the testsuite when it is run in the last hour of the day in the six weeks leading up to daylight savings starting in the environment's locale.
REASON: Exception: Exception: Traceback (most recent call last):
line 44, in test_auth_expire_warning
self.assertEqual(res.info, u"Your password will expire in 42
AssertionError: 'Your password will expire in 44 days.\n' != 'Your
password will expire in 42 days.\n'
- Your password will expire in 44 days.
+ Your password will expire in 42 days.
It would be understandable to say "43 days", but adding 44 is going too far.
pam_winbind is using localtime_r() and rounding to the day start, which clearly has something to do with it.