From 118db4ca11bec17b8f5955f188c07f154b85c87b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Nov 2012 14:09:34 +0100 Subject: s4:provision: add get_empty_descriptor() Signed-off-by: Stefan Metzmacher Reviewed-by: Michael Adam --- source4/scripting/python/samba/provision/__init__.py | 1 + source4/scripting/python/samba/provision/descriptor.py | 5 +++++ 2 files changed, 6 insertions(+) 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): -- cgit