From 5074b98714c9e038cc31872111508c1d92562841 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 17 Feb 2013 22:03:18 +1100 Subject: scripting: Rework samba.upgradehelpers.get_diff_sddls to be get_diff_sds This moves the SDDL conversion inside the get_diff_sds function and prepares for removing inherited ACEs from the SD before comparison. Andrew Bartlett Reviewed-by: Stefan Metzmacher --- python/samba/upgradehelpers.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'python/samba/upgradehelpers.py') diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py index 1ec19d4ab6..88182bd4a1 100644 --- a/python/samba/upgradehelpers.py +++ b/python/samba/upgradehelpers.py @@ -346,8 +346,8 @@ def chunck_sddl(sddl): return hash -def get_diff_sddls(refsddl, cursddl, checkSacl = True): - """Get the difference between 2 sddl +def get_diff_sds(refsd, cursd, domainsid, checkSacl = True): + """Get the difference between 2 sd This function split the textual representation of ACL into smaller chunck in order to not to report a simple permutation as a difference @@ -358,6 +358,9 @@ def get_diff_sddls(refsddl, cursddl, checkSacl = True): :return: A string that explain difference between sddls """ + cursddl = cursd.as_sddl(domainsid) + refsddl = refsd.as_sddl(domainsid) + txt = "" hash_cur = chunck_sddl(cursddl) hash_ref = chunck_sddl(refsddl) -- cgit