diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-11-29 09:57:44 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-03 08:46:46 +0100 |
commit | 6f71071381ead9976f4a6d296c9a1ade385484e0 (patch) | |
tree | bd9cf7d4737ce6d6cdf23d9515bf73620c0a5837 /source4/scripting/python | |
parent | 06f026368e5b657394bb9e681c3d0184104bc120 (diff) | |
download | samba-6f71071381ead9976f4a6d296c9a1ade385484e0.tar.gz samba-6f71071381ead9976f4a6d296c9a1ade385484e0.tar.bz2 samba-6f71071381ead9976f4a6d296c9a1ade385484e0.zip |
s4:python/ntacl: add 'as_sddl' option to dsacl2fsacl()
This allows the caller to ask for a security.descriptor instead of sddl
by passing 'as_sddl=False'.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/ntacls.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/ntacls.py b/source4/scripting/python/samba/ntacls.py index d86c5171b3..b89e9e9480 100644 --- a/source4/scripting/python/samba/ntacls.py +++ b/source4/scripting/python/samba/ntacls.py @@ -209,7 +209,7 @@ def ldapmask2filemask(ldm): return filemask -def dsacl2fsacl(dssddl, sid): +def dsacl2fsacl(dssddl, sid, as_sddl=True): """ This function takes an the SDDL representation of a DS @@ -234,4 +234,7 @@ def dsacl2fsacl(dssddl, sid): ace.access_mask = ldapmask2filemask(ace.access_mask) fdescr.dacl_add(ace) + if not as_sddl: + return fdescr + return fdescr.as_sddl(sid) |