summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-08-17 11:41:58 +1000
committerAndrew Bartlett <abartlet@samba.org>2009-08-17 11:47:14 +1000
commite349316550fefcb7d991adfe66d5118baac24a01 (patch)
tree18b4815205ddbac6c0bc260baad83d2d3d9b553c /source4/scripting/python
parent5f917d5f177401edbe0c11fd98f2e9203136de32 (diff)
downloadsamba-e349316550fefcb7d991adfe66d5118baac24a01.tar.gz
samba-e349316550fefcb7d991adfe66d5118baac24a01.tar.bz2
samba-e349316550fefcb7d991adfe66d5118baac24a01.zip
s4:provision Add comments to the provision script
Hopefully this will explain a bit more whey things are done the way that they are done. Andrew Bartlett
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/provision.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 34af462ebf..c029bea848 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -835,10 +835,18 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
samdb.transaction_start()
try:
message("Erasing data from partitions")
- # Load the schema (again). This time it will force a reindex, to make the below computationally sane
+ # Load the schema (again). This time it will force a reindex,
+ # and will therefore make the erase_partitions() below
+ # computationally sane
samdb.set_schema_from_ldb(schema.ldb)
samdb.erase_partitions()
+ # Set the domain functionality levels onto the database.
+ # Various module (the password_hash module in particular) need
+ # to know what level of AD we are emulating.
+
+ # These will be fixed into the database via the database
+ # modifictions below, but we need them set from the start.
samdb.set_opaque_integer("domainFunctionality", domainFunctionality)
samdb.set_opaque_integer("forestFunctionality", forestFunctionality)
samdb.set_opaque_integer("domainControllerFunctionality", domainControllerFunctionality)
@@ -888,6 +896,7 @@ def setup_samdb(path, setup_path, session_info, credentials, lp,
"SCHEMADN": names.schemadn,
})
+ # The LDIF here was created when the Schema object was constructed
message("Setting up sam.ldb schema")
samdb.add_ldif(schema.schema_dn_add)
samdb.modify_ldif(schema.schema_dn_modify)