diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-02-17 22:03:18 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2013-03-04 08:33:08 +0100 |
commit | 5074b98714c9e038cc31872111508c1d92562841 (patch) | |
tree | 06c5ebd2131a9a6d5968bb541a75797a4cbb87a0 /python/samba/upgradehelpers.py | |
parent | 787a6aacc3003731784b29fd92c683036c8730a7 (diff) | |
download | samba-5074b98714c9e038cc31872111508c1d92562841.tar.gz |
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 <metze@samba.org>
Diffstat (limited to 'python/samba/upgradehelpers.py')
-rw-r--r-- | python/samba/upgradehelpers.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py index 1ec19d4ab61..88182bd4a1e 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) |