From: Andrew Bartlett Date: Wed, 13 Dec 2017 01:46:00 +0000 (+1300) Subject: selftest: Fix flapping samba.dsdb test X-Git-Tag: talloc-2.1.11~241 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d2b14b7578897b23570f269aeb84a81901e1d606;p=thirdparty%2Fsamba.git selftest: Fix flapping samba.dsdb test The check for the final digit in the SID was wrong, any domain SID ending with a zero would fail the test. Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/python/samba/tests/dsdb.py b/python/samba/tests/dsdb.py index 34a9435ea44..0b3c1927504 100644 --- a/python/samba/tests/dsdb.py +++ b/python/samba/tests/dsdb.py @@ -207,7 +207,7 @@ class DsdbTests(TestCase): # i.e a SID not in the current domain. # dom_sid = self.samdb.get_domain_sid() - if str(dom_sid)[:-1] == "0": + if str(dom_sid).endswith("0"): c = "9" else: c = "0"