diff options
author | Nadezhda Ivanova <nivanova@samba.org> | 2011-01-17 17:44:10 +0200 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@samba.org> | 2011-01-17 17:38:04 +0100 |
commit | 35d8b808005638e9fa33bf7983d449db34dfb761 (patch) | |
tree | 6295826e34b798c0e537794523d7051b283fe046 /source4 | |
parent | 93da0aab9716d3f8154b6f4d39bfdf47634a96e0 (diff) | |
download | samba-35d8b808005638e9fa33bf7983d449db34dfb761.tar.gz samba-35d8b808005638e9fa33bf7983d449db34dfb761.tar.bz2 samba-35d8b808005638e9fa33bf7983d449db34dfb761.zip |
s4-tools: Fixed a bug in ldapcmp - DACL was not retrieved correctly if the object had no SACL.
--Pair-Programmed-With: Zahari Zahariev
Diffstat (limited to 'source4')
-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) |