1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-22 16:59:09 +03:00

s4:provision Allow a specific prefix map to be loaded into a new schema provision

This allows the prefixMap from a DRS server to be used when loading
the schema from the local files.  This helps us then import other
schema with this map in place.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
This commit is contained in:
Andrew Bartlett
2010-06-10 21:33:45 +10:00
parent 9e28ceda96
commit 7c60ac97bf
5 changed files with 37 additions and 6 deletions

View File

@ -166,7 +166,8 @@ def get_dnsyntax_attributes(schemadn,schemaldb):
def ldb_with_schema(setup_dir=None,
schemadn="cn=schema,cn=configuration,dc=example,dc=com",
serverdn="cn=server,cn=servers,cn=default-first-site-name,cn=sites,cn=cn=configuration,dc=example,dc=com",
domainsid=None):
domainsid=None,
override_prefixmap=None):
"""Load schema for the SamDB from the AD schema files and samba4_schema.ldif
:param setup_dir: Setup path
@ -185,4 +186,4 @@ def ldb_with_schema(setup_dir=None,
domainsid = security.random_sid()
else:
domainsid = security.dom_sid(domainsid)
return Schema(setup_path, domainsid, schemadn=schemadn, serverdn=serverdn)
return Schema(setup_path, domainsid, schemadn=schemadn, serverdn=serverdn, override_prefixmap=override_prefixmap)