1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

s4-tools: Fixed a bug in ldapcmp - DACL was not retrieved correctly if the object had no SACL.

--Pair-Programmed-With: Zahari Zahariev
This commit is contained in:
Nadezhda Ivanova
2011-01-17 17:44:10 +02:00
parent 93da0aab97
commit 35d8b80800

View File

@ -216,7 +216,10 @@ class Descriptor(object):
""" Extracts the DACL as a list of ACE string (with the brakets).
"""
try:
res = re.search("D:(.*?)(\(.*?\))S:", self.sddl).group(2)
if "S:" in self.sddl:
res = re.search("D:(.*?)(\(.*?\))S:", self.sddl).group(2)
else:
res = re.search("D:(.*?)(\(.*\))", self.sddl).group(2)
except AttributeError:
return []
return re.findall("(\(.*?\))", res)