git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06f0263
)
s4:python/ntacl: add 'as_sddl' option to dsacl2fsacl()
author
Stefan Metzmacher
<metze@samba.org>
Thu, 29 Nov 2012 08:57:44 +0000
(09:57 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 3 Dec 2012 07:46:46 +0000
(08:46 +0100)
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>
source4/scripting/python/samba/ntacls.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/ntacls.py
b/source4/scripting/python/samba/ntacls.py
index d86c5171b39f1e9f6d45b3cfee647c7c07bff90a..b89e9e94803f879ce19a0913ba5d9ae3fdfd1eea 100644
(file)
--- 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)