"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source4/dsdb/tests/python/asq.py" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

asq.py  (samba-4.12.3):asq.py  (samba-4.12.5)
skipping to change at line 164 skipping to change at line 164
self.assertEqual(len(msgs), 20) self.assertEqual(len(msgs), 20)
for msg in msgs: for msg in msgs:
self.assertNotEqual(msg.dn, self.top_dn) self.assertNotEqual(msg.dn, self.top_dn)
self.assertIn(msg.dn, self.members2) self.assertIn(msg.dn, self.members2)
for group in msg["member"]: for group in msg["member"]:
self.assertIn(ldb.Dn(self.ldb, str(group)), self.assertIn(ldb.Dn(self.ldb, str(group)),
self.members) self.members)
def test_asq_vlv(self):
"""Testing ASQ behaviour with VLV set.
ASQ is very strange, it turns a BASE search into a search for
all the objects pointed to by the specified attribute,
returning multiple entries!
"""
sort_control = "server_sort:1:0:cn"
msgs = self.ldb.search(base=self.top_dn,
scope=ldb.SCOPE_BASE,
attrs=["objectGUID", "cn", "member"],
controls=["asq:1:member",
sort_control,
"vlv:1:20:20:11:0"])
self.assertEqual(len(msgs), 20)
for msg in msgs:
self.assertNotEqual(msg.dn, self.top_dn)
self.assertIn(msg.dn, self.members2)
for group in msg["member"]:
self.assertIn(ldb.Dn(self.ldb, str(group)),
self.members)
def test_asq_vlv_paged(self):
"""Testing ASQ behaviour with VLV and paged_results set.
ASQ is very strange, it turns a BASE search into a search for
all the objects pointed to by the specified attribute,
returning multiple entries!
Thankfully combining both of these gives
unavailable-critical-extension against Windows 1709
"""
sort_control = "server_sort:1:0:cn"
try:
msgs = self.ldb.search(base=self.top_dn,
scope=ldb.SCOPE_BASE,
attrs=["objectGUID", "cn", "member"],
controls=["asq:1:member",
sort_control,
"vlv:1:20:20:11:0",
"paged_results:1:1024"])
self.fail("should have failed with LDAP_UNAVAILABLE_CRITICAL_EXTENSI
ON")
except ldb.LdbError as e:
(enum, estr) = e.args
self.assertEqual(enum, ldb.ERR_UNSUPPORTED_CRITICAL_EXTENSION)
if "://" not in url: if "://" not in url:
if os.path.isfile(url): if os.path.isfile(url):
url = "tdb://%s" % url url = "tdb://%s" % url
else: else:
url = "ldap://%s" % url url = "ldap://%s" % url
TestProgram(module=__name__, opts=subunitopts) TestProgram(module=__name__, opts=subunitopts)
 End of changes. 1 change blocks. 
0 lines changed or deleted 55 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)