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

s4:dsdb/tests: let OwnerGroupDescriptorTests.test_141() set the required ACE explicitly

All other tests use the same logic and run before, which means the ACE
is already there and is implicitly required.

As we want to cleanup the ACE after each test in the next step,
as the tests should not have side effects for other tests, e.g.
'blackbox.dbcheck'.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15338

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2023-03-20 12:04:37 +01:00 committed by Andrew Bartlett
parent 7e3cbc2c64
commit 7b0d528536

View File

@ -868,6 +868,9 @@ class OwnerGroupDescriptorTests(DescriptorTests):
self.check_user_belongs(self.get_users_domain_dn(user_name), [])
# Open Ldb connection with the tested user
_ldb = self.get_ldb_connection(user_name, "samba123@")
# Change Schema partition descriptor
mod = "(A;;CC;;;AU)"
self.sd_utils.dacl_add_ace(self.schema_dn, mod)
# Create a custom security descriptor
# NB! Problematic owner part won't accept DA only <User Sid> !!!
user_sid = self.sd_utils.get_object_sid(self.get_users_domain_dn(user_name))