diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-10-02 10:28:29 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2009-10-21 22:43:50 +1100 |
commit | c59f00805cb06f3cb90d89690e142006658972d3 (patch) | |
tree | 0c6a261d2aaa3893204d32e64db5f0b66b9bdbca /source4/scripting/python | |
parent | 9393d94ad48160d3af665ed7362683b0a59ce72d (diff) | |
download | samba-c59f00805cb06f3cb90d89690e142006658972d3.tar.gz samba-c59f00805cb06f3cb90d89690e142006658972d3.tar.bz2 samba-c59f00805cb06f3cb90d89690e142006658972d3.zip |
s4:dsdb Rework modules create new partitions at runtime
This is done by passing an extended operation to the partitions module
to extend the @PARTITION record and to extend the in-memory list of
partitions.
This also splits things up into module parts that belong above and below
repl_meta_data
Also slit the partitions module into two files due to the complexity
of the code
Andrew Barltett
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index d7fadf3b7e..dff61415a7 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -652,15 +652,11 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info, "linked_attributes", "extended_dn_out_ldb"] modules_list2 = ["show_deleted", + "new_partition", "partition"] - - domaindn_ldb = "users.ldb" - configdn_ldb = "configuration.ldb" - schemadn_ldb = "schema.ldb" + ldap_backend_line = "# No LDAP backend" if ldap_backend is not None: - domaindn_ldb = ldap_backend.ldapi_uri - configdn_ldb = ldap_backend.ldapi_uri - schemadn_ldb = ldap_backend.ldapi_uri + ldap_backend_line = "ldapBackend: %s" % ldap_backend.ldapi_uri if ldap_backend.ldap_backend_type == "fedora-ds": backend_modules = ["nsuniqueid", "paged_searches"] @@ -686,13 +682,10 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info, try: message("Setting up sam.ldb partitions and settings") setup_add_ldif(samdb, setup_path("provision_partitions.ldif"), { - "SCHEMADN": names.schemadn, - "SCHEMADN_LDB": schemadn_ldb, + "SCHEMADN": ldb.Dn(samdb, names.schemadn).get_casefold(), "SCHEMADN_MOD2": ",objectguid", - "CONFIGDN": names.configdn, - "CONFIGDN_LDB": configdn_ldb, - "DOMAINDN": names.domaindn, - "DOMAINDN_LDB": domaindn_ldb, + "CONFIGDN": ldb.Dn(samdb, names.configdn).get_casefold(), + "DOMAINDN": ldb.Dn(samdb, names.domaindn).get_casefold(), "SCHEMADN_MOD": "schema_fsmo", "CONFIGDN_MOD": "naming_fsmo", "DOMAINDN_MOD": "pdc_fsmo", @@ -700,6 +693,7 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info, "TDB_MODULES_LIST": tdb_modules_list_as_string, "MODULES_LIST2": ",".join(modules_list2), "BACKEND_MOD": ",".join(backend_modules), + "LDAP_BACKEND_LINE": ldap_backend_line, }) samdb.load_ldif_file_add(setup_path("provision_init.ldif")) |