summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-08-01 20:47:03 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-08-01 20:47:03 +0200
commit3b4ff07ded89703b2a58ae2c9ca6f0ea82bb5a52 (patch)
tree03b912a9e1c470dacdadbf0d17ad253b1c57f4a4 /source4/scripting/python
parent2fbe25b39d096b55a5dbb80720cd01e08e42a2b0 (diff)
downloadsamba-3b4ff07ded89703b2a58ae2c9ca6f0ea82bb5a52.tar.gz
samba-3b4ff07ded89703b2a58ae2c9ca6f0ea82bb5a52.tar.bz2
samba-3b4ff07ded89703b2a58ae2c9ca6f0ea82bb5a52.zip
Actually fix missing substitution variables.
(This used to be commit 783412ecb27d646b171993da0ac2f11a821901d3)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/provision.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 6b1fd33b9f..6dd9f3b8bd 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -739,7 +739,8 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
samdb.set_invocation_id(invocationid)
load_schema(setup_path, samdb, names.schemadn, names.netbiosname,
- names.configdn, names.sitename)
+ names.configdn, names.sitename, names.serverdn,
+ names.hostname)
samdb.transaction_start()
@@ -1423,7 +1424,8 @@ def create_krb5_conf(path, setup_path, dnsdomain, hostname, realm):
})
-def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
+def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename,
+ serverdn, servername):
"""Load schema for the SamDB.
:param samdb: Load a schema into a SamDB.
@@ -1431,6 +1433,8 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
:param schemadn: DN of the schema
:param netbiosname: NetBIOS name of the host.
:param configdn: DN of the configuration
+ :param serverdn: DN of the server
+ :param servername: Host name of the server
"""
schema_data = open(setup_path("schema.ldif"), 'r').read()
schema_data += open(setup_path("schema_samba4.ldif"), 'r').read()
@@ -1444,8 +1448,10 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename):
"SCHEMADN": schemadn,
"NETBIOSNAME": netbiosname,
"CONFIGDN": configdn,
- "DEFAULTSITE":sitename,
- "PREFIXMAP_B64":prefixmap
+ "DEFAULTSITE": sitename,
+ "PREFIXMAP_B64": prefixmap,
+ "SERVERDN": serverdn,
+ "SERVERNAME": servername,
})
check_all_substituted(head_data)
samdb.attach_schema_from_ldif(head_data, schema_data)