diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-01-17 12:00:27 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-01-17 12:00:27 +1100 |
commit | f1e177a7b8e660b245d5fb9b11a66b43c9b69784 (patch) | |
tree | 2bb54eec3573ae3d0fd5abf6aa34710431264ecb /source4/scripting/libjs | |
parent | b44f322f5d5940cb61b2f9c9e44fc25ed00e81be (diff) | |
download | samba-f1e177a7b8e660b245d5fb9b11a66b43c9b69784.tar.gz samba-f1e177a7b8e660b245d5fb9b11a66b43c9b69784.tar.bz2 samba-f1e177a7b8e660b245d5fb9b11a66b43c9b69784.zip |
provision: simplfy by removing old code to manually create baseDNs.
Previously, we would create the first record in the DB as an LDIF
file, with the expectation that the administrator would use slapadd to
create the database.
We now do everything over LDAP, which is far simpler, and allows the
LDB module chain to do its work, without special cases.
Also fix naming of the output schema when suggesting the comamnd line
to run ad2oLschema in provision-backend.
Andrew Bartlett
(This used to be commit e77375758d66e94e5e0b6e61a97c9281c3d9c71f)
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r-- | source4/scripting/libjs/provision.js | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index 266bac1a75..381288417a 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -398,9 +398,6 @@ function provision_default_paths(subobj) paths.named_conf = lp.get("private dir") + "/named.conf"; paths.winsdb = "wins.ldb"; paths.ldapdir = lp.get("private dir") + "/ldap"; - paths.ldap_basedn_ldif = paths.ldapdir + "/" + dnsdomain + ".ldif"; - paths.ldap_config_basedn_ldif = paths.ldapdir + "/" + dnsdomain + "-config.ldif"; - paths.ldap_schema_basedn_ldif = paths.ldapdir + "/" + dnsdomain + "-schema.ldif"; paths.s4_ldapi_socket = lp.get("private dir") + "/ldapi"; paths.phpldapadminconfig = lp.get("private dir") + "/phpldapadmin-config.php"; @@ -866,6 +863,12 @@ function provision_schema(subobj, message, tmp_schema_path, paths) /* This will erase anything in the tmp db */ var samdb = open_ldb(info, tmp_schema_path, true); + message("Setting up sam.ldb attributes\n"); + setup_add_ldif("provision_init.ldif", info, samdb, false); + + message("Setting up sam.ldb rootDSE\n"); + setup_add_ldif("provision_rootdse_add.ldif", info, samdb, false); + message("Adding schema container (permitted to fail)\n"); var add_ok = setup_add_ldif("provision_schema_basedn.ldif", info, samdb, true); message("Modifying schema container\n"); @@ -934,34 +937,6 @@ function provision_dns(subobj, message, paths, session_info, credentials) message("Please install the zone located in " + paths.dns + " into your DNS server. A sample BIND configuration snippit is at " + paths.named_conf + "\n"); } -/* Write out a DNS zone file, from the info in the current database */ -function provision_ldapbase(subobj, message, paths) -{ - var ok = provision_fix_subobj(subobj, paths); - assert(ok); - - message("Setting up LDAP base entry: " + subobj.DOMAINDN + " \n"); - var rdns = split(",", subobj.DOMAINDN); - subobj.EXTENSIBLEOBJECT = "objectClass: extensibleObject"; - - subobj.RDN_DC = substr(rdns[0], strlen("DC=")); - - sys.mkdir(paths.ldapdir, 0700); - - setup_file("provision_basedn.ldif", - message, paths.ldap_basedn_ldif, - subobj); - - setup_file("provision_configuration_basedn.ldif", - message, paths.ldap_config_basedn_ldif, - subobj); - - setup_file("provision_schema_basedn.ldif", - message, paths.ldap_schema_basedn_ldif, - subobj); - -} - /* guess reasonably default options for provisioning @@ -1045,7 +1020,6 @@ function provision_guess() subobj.CONFIGDN_MOD2 = ",objectguid"; subobj.SCHEMADN_MOD2 = ",objectguid"; - subobj.EXTENSIBLEOBJECT = "# no objectClass: extensibleObject for local ldb"; subobj.ACI = "# no aci for local ldb"; return subobj; |