1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

domain_update: remove useless searches to '(objectClass=samDomain)'

samDomain is an auxiliary class of domainDNS, so we'll handle them
in the search for domainDNS anyway. In addition searches for auxiliary
classes will never be found in searches.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-03-13 12:05:24 +01:00 committed by Andrew Bartlett
parent c87f2606ae
commit a3dac8efe4

View File

@ -298,16 +298,6 @@ objectClass: msTPM-InformationObjectsContainer
ace = "(OA;CIIO;WP;ea1b7b93-5e48-46d5-bc6c-4df4fda78a35;bf967a86-0de6-11d0-a285-00aa003049e2;PS)"
res = self.samdb.search(expression="(objectClass=samDomain)",
attrs=["nTSecurityDescriptor"],
controls=["search_options:1:2"])
for msg in res:
existing_sd = ndr_unpack(security.descriptor,
msg["nTSecurityDescriptor"][0])
existing_sddl = existing_sd.as_sddl(self.domain_sid)
self.insert_ace_into_dacl(msg.dn, existing_sddl, ace)
res = self.samdb.search(expression="(objectClass=domainDNS)",
attrs=["nTSecurityDescriptor"],
controls=["search_options:1:2"])
@ -354,16 +344,6 @@ objectClass: msTPM-InformationObjectsContainer
ace = "(OA;CIOI;RPWP;3f78c3e5-f79a-46bd-a0b8-9d18116ddc79;;PS)"
res = self.samdb.search(expression="(objectClass=samDomain)",
attrs=["nTSecurityDescriptor"],
controls=["search_options:1:2"])
for msg in res:
existing_sd = ndr_unpack(security.descriptor,
msg["nTSecurityDescriptor"][0])
existing_sddl = existing_sd.as_sddl(self.domain_sid)
self.insert_ace_into_dacl(msg.dn, existing_sddl, ace)
res = self.samdb.search(expression="(objectClass=domainDNS)",
attrs=["nTSecurityDescriptor"],
controls=["search_options:1:2"])