diff options
-rwxr-xr-x | source4/scripting/python/samba/netcmd/ldapcmp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/netcmd/ldapcmp.py b/source4/scripting/python/samba/netcmd/ldapcmp.py index d62b554424..1cde860fb1 100755 --- a/source4/scripting/python/samba/netcmd/ldapcmp.py +++ b/source4/scripting/python/samba/netcmd/ldapcmp.py @@ -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) |