mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
selftest: correcting empty attribute usage in requests
Many parts of Samba use an empty attribute list in requests expecting all attributes to be returned in the response, which is incorrect. This patch corrects the instances found by current CI tests. Static analysis and debugging will need to be done before changing ildap to the correct semantics. Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Mon May 6 05:45:55 UTC 2019 on sn-devel-184
This commit is contained in:
parent
64bccb9bca
commit
bc1583d368
@ -282,7 +282,7 @@ class ComputerCmdTestCase(SambaToolCmdTest):
|
||||
self.samdb.domain_dn()))
|
||||
computerlist = self.samdb.search(base=self.samdb.domain_dn(),
|
||||
scope=ldb.SCOPE_SUBTREE,
|
||||
expression=search_filter, attrs=[])
|
||||
expression=search_filter)
|
||||
if computerlist:
|
||||
return computerlist[0]
|
||||
else:
|
||||
|
@ -243,8 +243,7 @@ class GroupCmdTestCase(SambaToolCmdTest):
|
||||
self.samdb.domain_dn()))
|
||||
grouplist = self.samdb.search(base=self.samdb.domain_dn(),
|
||||
scope=ldb.SCOPE_SUBTREE,
|
||||
expression=search_filter,
|
||||
attrs=[])
|
||||
expression=search_filter)
|
||||
if grouplist:
|
||||
return grouplist[0]
|
||||
else:
|
||||
|
@ -264,8 +264,7 @@ class OUCmdTestCase(SambaToolCmdTest):
|
||||
self.samdb.domain_dn()))
|
||||
oulist = self.samdb.search(base=self.samdb.domain_dn(),
|
||||
scope=ldb.SCOPE_SUBTREE,
|
||||
expression=search_filter,
|
||||
attrs=[])
|
||||
expression=search_filter)
|
||||
if oulist:
|
||||
return oulist[0]
|
||||
else:
|
||||
|
@ -592,7 +592,7 @@ sAMAccountName: %s
|
||||
search_filter = "(&(sAMAccountName=%s)(objectCategory=%s,%s))" % (ldb.binary_encode(name), "CN=Person,CN=Schema,CN=Configuration", self.samdb.domain_dn())
|
||||
userlist = self.samdb.search(base=self.samdb.domain_dn(),
|
||||
scope=ldb.SCOPE_SUBTREE,
|
||||
expression=search_filter, attrs=[])
|
||||
expression=search_filter)
|
||||
if userlist:
|
||||
return userlist[0]
|
||||
else:
|
||||
|
@ -1847,7 +1847,7 @@ class SdFlagsDescriptorTests(DescriptorTests):
|
||||
self.assertFalse("nTSecurityDescriptor" in res[0])
|
||||
|
||||
res = self.ldb_admin.search(self.base_dn, SCOPE_BASE, None,
|
||||
[], controls=["sd_flags:1:%d" % (sd_flags)])
|
||||
controls=["sd_flags:1:%d" % (sd_flags)])
|
||||
self.assertTrue("nTSecurityDescriptor" in res[0])
|
||||
tmp = res[0]["nTSecurityDescriptor"][0]
|
||||
sd = ndr_unpack(security.descriptor, tmp)
|
||||
|
Loading…
Reference in New Issue
Block a user