[PATCH] Re: The dsdb test still fails
Andrew Bartlett
abartlet at samba.org
Wed Dec 13 01:51:04 UTC 2017
On Wed, 2017-12-13 at 07:09 +1300, Andrew Bartlett wrote:
> On Tue, 2017-12-12 at 16:46 +0100, Andreas Schneider wrote:
> > Hi Andrew,
> >
> > my autobuild failed at the dsdb test:
> >
> > [2026(12877)/2221 at 1h52m4s] samba.tests.dsdb(ad_dc_ntvfs:local)
> > WARNING: The "lsa over netlogon" option is deprecated
> > ../lib/ldb/ldb_tdb/ldb_index.c:1773: unique index violation on objectSid in
> > CN=S-1-5-21-2817006385-2043487667-2846940350-1000,CN=ForeignSecurityPrincipals,DC=samba,DC=example,DC=com,
> > conficts with <þ‰Ã‡‹Cº%Ûšì in
> > @INDEX:OBJECTSID::AQUAAAAAAAUVAAAAMRvop7MlzXm+3LCp6AMAAA==
> > UNEXPECTED(error):
> > samba.tests.dsdb.samba.tests.dsdb.DsdbTests.test_duplicate_objectSIDs_allowed_on_foreign_security_principals(ad_dc_ntvfs:local)
> > REASON: Exception: Exception: Traceback (most recent call last):
> > File "/memdisk/asn/a/b561948/samba/bin/python/samba/tests/dsdb.py", line
> > 219, in test_duplicate_objectSIDs_allowed_on_foreign_security_principals
> > "objectClass": "foreignSecurityPrincipal"})
> > LdbError: (19, '../lib/ldb/ldb_tdb/ldb_index.c:1909: Failed to re-index
> > objectSid in
> > CN=S-1-5-21-2817006385-2043487667-2846940350-1000,CN=ForeignSecurityPrincipals,DC=samba,DC=example,DC=com
> > - ../lib/ldb/ldb_tdb/ldb_index.c:1780: unique index violation on objectSid in
> > CN=S-1-5-21-2817006385-2043487667-2846940350-1000,CN=ForeignSecurityPrincipals,DC=samba,DC=example,DC=com')
>
> Thanks Andreas. I'll look into this one today, this is really strange.
Attached is a patch to fix that. Douglas has reviewed it and it is in
the autobuild queue.
Thanks,
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
-------------- next part --------------
From 9db4d2a8e7e7ec3173413d7a9005f5f85858ef12 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Wed, 13 Dec 2017 14:46:00 +1300
Subject: [PATCH 1/2] 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 <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
---
python/samba/tests/dsdb.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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"
--
2.11.0
From 820fd544d939e216cbaaa41e9662f4f90ace0e0d Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Wed, 13 Dec 2017 14:47:59 +1300
Subject: [PATCH 2/2] selftest: Add cleanup of ForeignSecurityPrincipal in
samba.dsdb test
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
---
python/samba/tests/dsdb.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/python/samba/tests/dsdb.py b/python/samba/tests/dsdb.py
index 0b3c1927504..94b21f2d249 100644
--- a/python/samba/tests/dsdb.py
+++ b/python/samba/tests/dsdb.py
@@ -229,6 +229,9 @@ class DsdbTests(TestCase):
self.fail("Got unexpected exception %d - %s "
% (code, msg))
+ # cleanup
+ self.samdb.delete(dn)
+
#
# Duplicate objectSID's should not be permitted for sids in the local
# domain. The test sequence is add an object, delete it, then attempt to
--
2.11.0
More information about the samba-technical
mailing list