pytests: sid_strings: do not fail if epoch ending has zeros
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 15 Nov 2023 00:03:27 +0000 (13:03 +1300)
committerJule Anger <janger@samba.org>
Mon, 20 Nov 2023 10:00:15 +0000 (10:00 +0000)
commita5b61b469a2303c31ca681a10bc70fb7cb86668e
tree0abd4afa735fc4568936a632688c4789577624ce
parentaf4fe00f2646bcc297053241d51ac841d982a078
pytests: sid_strings: do not fail if epoch ending has zeros

To avoid collisions in random OID strings, we started using the epoch
date modulus 100 million. The trouble is we did not strip out the
leading zeros, so the field might be '00000123' when it should be
'123', if the date happened not to correspond to an epoch with a zero
in the eighth to last place. This has been the case for most of the
last 1041 days, but fortunately the bug was only introduced earlier
this year.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15520

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
(cherry picked from commit 426ca4cf4b667aae03f0344cee449e972de90ac7)

Autobuild-User(v4-19-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-19-test): Mon Nov 20 10:00:15 UTC 2023 on atb-devel-224
python/samba/tests/sid_strings.py