mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
scripting: Modify samba.descriptor.get_diff_sds() to cope with a missing reference owner
This allows the reference SD not to have an owner specified, and still have the comparison with a database SD that does have an owner pass. (And the same for owning group). Andrew Bartlett Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
4789a3072a
commit
874a93bc1c
@ -528,13 +528,13 @@ def get_diff_sds(refsd, cursd, domainsid, checkSacl = True):
|
||||
|
||||
if not hash_cur.has_key("owner"):
|
||||
txt = "\tNo owner in current SD"
|
||||
elif hash_cur["owner"] != hash_ref["owner"]:
|
||||
elif hash_ref.has_key("owner") and hash_cur["owner"] != hash_ref["owner"]:
|
||||
txt = "\tOwner mismatch: %s (in ref) %s" \
|
||||
"(in current)\n" % (hash_ref["owner"], hash_cur["owner"])
|
||||
|
||||
if not hash_cur.has_key("group"):
|
||||
txt = "%s\tNo group in current SD" % txt
|
||||
elif hash_cur["group"] != hash_ref["group"]:
|
||||
elif hash_ref.has_key("group") and hash_cur["group"] != hash_ref["group"]:
|
||||
txt = "%s\tGroup mismatch: %s (in ref) %s" \
|
||||
"(in current)\n" % (txt, hash_ref["group"], hash_cur["group"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user