summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/provision.js
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-11-13 22:38:55 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:45:10 +0100
commit3f2ca10d2d86f0cd64822f9e5f95633f41263237 (patch)
treee1d80eb274d2fdbed3c3be52e08027bce655db38 /source4/scripting/libjs/provision.js
parentcadf696f8b9cda131f7b5a46169c2f5f3b47ab0a (diff)
downloadsamba-3f2ca10d2d86f0cd64822f9e5f95633f41263237.tar.gz
samba-3f2ca10d2d86f0cd64822f9e5f95633f41263237.tar.bz2
samba-3f2ca10d2d86f0cd64822f9e5f95633f41263237.zip
r25940: Rework the samldb and templates handling.
Templates just don't belong in the sam.ldb, as they don't obey any of the other rules. This moves them to a seperate templates.ldb. In samldb, this patch reworks the duplicate SID and Name detection code, to use ldb_search_exp_fmt() rather than gendb_search. This returns far more useful errors, which we now handle and report better. The call to samdb_search_for_parent_domain() has been moved in samldb, to allow both the account and SID uniqueness checks to be in the same domain. This function also returns better errors. dcesrv_drsuapi.c is updated for the new prototype of samdb_search_for_parent_domain() Andrew Bartlett (This used to be commit f1ab90c88c782c693b41795d70368650806543b5)
Diffstat (limited to 'source4/scripting/libjs/provision.js')
-rw-r--r--source4/scripting/libjs/provision.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 3f3b179688..73c7608814 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -383,6 +383,7 @@ function provision_default_paths(subobj)
paths.shareconf = lp.get("private dir") + "/" + "share.ldb";
paths.samdb = lp.get("sam database");
paths.secrets = lp.get("secrets database");
+ paths.templates = lp.get("private dir") + "/" + "templates.ldb";
paths.keytab = "secrets.keytab";
paths.dns_keytab = "dns.keytab";
paths.dns_keytab_abs = lp.get("private dir") + "/" + paths.dns_keytab;
@@ -528,6 +529,9 @@ function provision_become_dc(subobj, message, erase, paths, session_info)
info.message = message;
info.session_info = session_info;
+ message("Setting up teplates into " + paths.templates + "\n");
+ setup_ldb("provision_templates.ldif", info, paths.templates);
+
/* Also wipes the database */
message("Setting up " + paths.samdb + " partitions\n");
setup_ldb("provision_partitions.ldif", info, paths.samdb);
@@ -548,9 +552,6 @@ function provision_become_dc(subobj, message, erase, paths, session_info)
message("Setting up " + paths.samdb + " indexes\n");
setup_add_ldif("provision_index.ldif", info, samdb, false);
- message("Setting up " + paths.samdb + " templates\n");
- setup_add_ldif("provision_templates.ldif", info, samdb, false);
-
ok = samdb.transaction_commit();
assert(ok);
@@ -623,6 +624,9 @@ function provision(subobj, message, blank, paths, session_info, credentials, lda
var reg = reg_open();
reg.apply_patchfile(lp.get("setup directory") + "/provision.reg")
+ message("Setting up teplates into " + paths.templates + "\n");
+ setup_ldb("provision_templates.ldif", info, paths.templates);
+
message("Setting up sam.ldb partitions\n");
/* Also wipes the database */
setup_ldb("provision_partitions.ldif", info, paths.samdb);
@@ -707,8 +711,6 @@ function provision(subobj, message, blank, paths, session_info, credentials, lda
message("Setting up display specifiers\n");
setup_add_ldif("display_specifiers.ldif", info, samdb, false);
- message("Setting up sam.ldb templates\n");
- setup_add_ldif("provision_templates.ldif", info, samdb, false);
message("Adding users container (permitted to fail)\n");
var add_ok = setup_add_ldif("provision_users_add.ldif", info, samdb, true);