summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-11-22 14:09:34 +0100
committerMichael Adam <obnox@samba.org>2012-11-30 17:17:20 +0100
commit118db4ca11bec17b8f5955f188c07f154b85c87b (patch)
treeb601c3b6064270d677d94c3715450c8b6bb4486d /source4/scripting
parent7a3e4d04c7e06379eddacb4f025a3c48a0a754a4 (diff)
downloadsamba-118db4ca11bec17b8f5955f188c07f154b85c87b.tar.gz
samba-118db4ca11bec17b8f5955f188c07f154b85c87b.tar.bz2
samba-118db4ca11bec17b8f5955f188c07f154b85c87b.zip
s4:provision: add get_empty_descriptor()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision/__init__.py1
-rw-r--r--source4/scripting/python/samba/provision/descriptor.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py
index 47bc6f92d8..c3713c9057 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -77,6 +77,7 @@ from samba.provision.backend import (
OpenLDAPBackend,
)
from samba.provision.descriptor import (
+ get_empty_descriptor,
get_config_descriptor,
get_domain_descriptor
)
diff --git a/source4/scripting/python/samba/provision/descriptor.py b/source4/scripting/python/samba/provision/descriptor.py
index 69c1be7197..3bb2468262 100644
--- a/source4/scripting/python/samba/provision/descriptor.py
+++ b/source4/scripting/python/samba/provision/descriptor.py
@@ -31,6 +31,11 @@ from samba.ndr import ndr_pack
# Descriptors of naming contexts and other important objects
+def get_empty_descriptor(domain_sid):
+ sddl= ""
+ sec = security.descriptor.from_sddl(sddl, domain_sid)
+ return ndr_pack(sec)
+
# "get_schema_descriptor" is located in "schema.py"
def get_config_descriptor(domain_sid):