summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting')
-rwxr-xr-xsource4/scripting/bin/upgradeprovision3
-rw-r--r--source4/scripting/python/samba/provision.py5
-rw-r--r--source4/scripting/python/samba/provisionbackend.py3
-rw-r--r--source4/scripting/python/samba/schema.py10
4 files changed, 7 insertions, 14 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 37c66b61a5..c4dcfbf774 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -1671,8 +1671,7 @@ if __name__ == '__main__':
new_ldbs.startTransactions()
# 12)
- schema = Schema(setup_path, names.domainsid, schemadn=str(names.schemadn),
- serverdn=str(names.serverdn))
+ schema = Schema(setup_path, names.domainsid, schemadn=str(names.schemadn))
# We create a closure that will be invoked just before schema reload
def schemareloadclosure():
basesam = Ldb(paths.samdb, session_info=session, credentials=creds, lp=lp,
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 99e2e13c32..fe27d882b2 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1055,7 +1055,7 @@ def setup_samdb(path, setup_path, session_info, provision_backend, lp, names,
names=names, serverrole=serverrole, schema=schema)
if schema is None:
- schema = Schema(setup_path, domainsid, schemadn=names.schemadn, serverdn=names.serverdn)
+ schema = Schema(setup_path, domainsid, schemadn=names.schemadn)
# Load the database, but don's load the global schema and don't connect quite yet
samdb = SamDB(session_info=session_info, url=None, auto_connect=False,
@@ -1465,8 +1465,7 @@ def provision(setup_dir, logger, session_info,
ldapi_url = "ldapi://%s" % urllib.quote(paths.s4_ldapi_path, safe="")
- schema = Schema(setup_path, domainsid, invocationid=invocationid, schemadn=names.schemadn,
- serverdn=names.serverdn)
+ schema = Schema(setup_path, domainsid, invocationid=invocationid, schemadn=names.schemadn)
if backend_type == "ldb":
provision_backend = LDBBackend(backend_type,
diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index 7a36bdc9c9..0848d9c364 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -303,7 +303,7 @@ class OpenLDAPBackend(LDAPBackend):
self.olcseedldif = os.path.join(self.ldapdir, "olc_seed.ldif")
self.schema = Schema(self.setup_path, self.domainsid,
- schemadn=self.names.schemadn, serverdn=self.names.serverdn,
+ schemadn=self.names.schemadn,
files=[setup_path("schema_samba4.ldif")])
def setup_db_config(self, dbdir):
@@ -603,7 +603,6 @@ class FDSBackend(LDAPBackend):
self.setup_path,
self.domainsid,
schemadn=self.names.schemadn,
- serverdn=self.names.serverdn,
files=[setup_path("schema_samba4.ldif"), self.samba3_ldif],
additional_prefixmap=["1000:1.3.6.1.4.1.7165.2.1", "1001:1.3.6.1.4.1.7165.2.2"])
diff --git a/source4/scripting/python/samba/schema.py b/source4/scripting/python/samba/schema.py
index a9e1122111..848d4ecfc0 100644
--- a/source4/scripting/python/samba/schema.py
+++ b/source4/scripting/python/samba/schema.py
@@ -54,13 +54,12 @@ def get_schema_descriptor(domain_sid):
class Schema(object):
def __init__(self, setup_path, domain_sid, invocationid=None, schemadn=None,
- serverdn=None, files=None, override_prefixmap=None, additional_prefixmap=None):
+ files=None, override_prefixmap=None, additional_prefixmap=None):
"""Load schema for the SamDB from the AD schema files and samba4_schema.ldif
:param samdb: Load a schema into a SamDB.
:param setup_path: Setup path function.
:param schemadn: DN of the schema
- :param serverdn: DN of the server
Returns the schema data loaded, to avoid double-parsing when then needing to add it to the db
"""
@@ -68,8 +67,6 @@ class Schema(object):
self.schemadn = schemadn
# We need to have the am_rodc=False just to keep some warnings quiet - this isn't a real SAM, so it's meaningless.
self.ldb = SamDB(global_schema=False, am_rodc=False)
- if serverdn is not None:
- self.ldb.set_ntds_settings_dn("CN=NTDS Settings,%s" % serverdn)
if invocationid is not None:
self.ldb.set_invocation_id(invocationid)
@@ -87,7 +84,7 @@ class Schema(object):
self.schema_dn_modify = read_and_sub_file(
setup_path("provision_schema_basedn_modify.ldif"),
- {"SCHEMADN": schemadn, "SERVERDN": serverdn})
+ {"SCHEMADN": schemadn})
descr = b64encode(get_schema_descriptor(domain_sid))
self.schema_dn_add = read_and_sub_file(
@@ -174,7 +171,6 @@ 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,
override_prefixmap=None):
"""Load schema for the SamDB from the AD schema files and samba4_schema.ldif
@@ -195,4 +191,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, override_prefixmap=override_prefixmap)
+ return Schema(setup_path, domainsid, schemadn=schemadn, override_prefixmap=override_prefixmap)