summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/upgradehelpers.py
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-06-18 23:21:18 +0400
committerMatthieu Patou <mat@samba.org>2011-06-19 23:21:08 +0200
commit7128345969927461ec281583abec3ea51bf98586 (patch)
treea9d5155f15c0ba9862300c59675c9a73fb209f05 /source4/scripting/python/samba/upgradehelpers.py
parentc0eb4037585e1feb609d7acef196c4dc8872960b (diff)
downloadsamba-7128345969927461ec281583abec3ea51bf98586.tar.gz
samba-7128345969927461ec281583abec3ea51bf98586.tar.bz2
samba-7128345969927461ec281583abec3ea51bf98586.zip
s4-python: make checks of sacl in get_diff_sddls optionnal
Diffstat (limited to 'source4/scripting/python/samba/upgradehelpers.py')
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index ad5de73b5b..baba332c23 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -360,7 +360,7 @@ def chunck_sddl(sddl):
return hash
-def get_diff_sddls(refsddl, cursddl):
+def get_diff_sddls(refsddl, cursddl, checkSacl = True):
"""Get the difference between 2 sddl
This function split the textual representation of ACL into smaller
@@ -368,6 +368,7 @@ def get_diff_sddls(refsddl, cursddl):
:param refsddl: First sddl to compare
:param cursddl: Second sddl to compare
+ :param checkSacl: If false we skip the sacl checks
:return: A string that explain difference between sddls
"""
@@ -387,7 +388,10 @@ def get_diff_sddls(refsddl, cursddl):
txt = "%s\tGroup mismatch: %s (in ref) %s" \
"(in current)\n" % (txt, hash_ref["group"], hash_cur["group"])
- for part in ["dacl", "sacl"]:
+ parts = [ "dacl" ]
+ if checkSacl:
+ parts.append("sacl")
+ for part in parts:
if hash_cur.has_key(part) and hash_ref.has_key(part):
# both are present, check if they contain the same ACE