summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-14 06:17:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:07 -0500
commitf3db23ac75578198ee411b21a7ba2ec49dedafab (patch)
tree4625f46ea496e475be03e8c94d968d15f56e9693 /swat
parentae51cc9bec8bc5d6efd035ac6e594aa7cc108ffe (diff)
downloadsamba-f3db23ac75578198ee411b21a7ba2ec49dedafab.tar.gz
samba-f3db23ac75578198ee411b21a7ba2ec49dedafab.tar.bz2
samba-f3db23ac75578198ee411b21a7ba2ec49dedafab.zip
r12928: This patch improves the interaction between the vampire and provsion code.
Previously, we had to know (or guess) the host and domain guid at the provision stage. Now we query the database post-provision, to extract the values and fill in the zone file. This allows us to generate a correct zone file in the Windows migration case. In an effort to make SWAT easier to use, I have removed and renamed some of the provision options. I have also fixed a nasty issue in my js code. I had implictly declared a global variable of the name 'join', with disasterious results for any subsequent user of the string utility function: esp exception - ASSERT at lib/appweb/ejs/ejsParser.c:2064, 0 Backtrace: [ 0] substitute_var:20 -> list[i] = join("", list2) [ 1] setup_file:9 -> data = substitute_var(data, subobj) Andrew Bartlett (This used to be commit a38ceefd11f8b748f30383ef36a4752f178bfca1)
Diffstat (limited to 'swat')
-rw-r--r--swat/install/provision.esp17
-rw-r--r--swat/install/vampire.esp29
2 files changed, 27 insertions, 19 deletions
diff --git a/swat/install/provision.esp b/swat/install/provision.esp
index 7dda74e732..ee9673d507 100644
--- a/swat/install/provision.esp
+++ b/swat/install/provision.esp
@@ -21,13 +21,12 @@ var subobj = provision_guess();
/* Don't supply default password for web interface */
subobj.ADMINPASS = "";
-f.add("REALM", "Realm");
-f.add("DOMAIN", "Domain Name");
+f.add("REALM", "DNS Domain Name");
+f.add("DOMAIN", "NetBIOS Domain Name");
f.add("HOSTNAME", "Hostname");
f.add("ADMINPASS", "Administrator Password", "password");
f.add("CONFIRM", "Confirm Password", "password");
f.add("DOMAINSID", "Domain SID");
-f.add("HOSTGUID", "Host GUID");
f.add("HOSTIP", "Host IP");
f.add("DEFAULTSITE", "Default Site");
f.submit[0] = "Provision";
@@ -60,8 +59,16 @@ if (form['submit'] == "Provision") {
} else if (!provision_validate(subobj, writefln)) {
f.display();
} else {
- provision(subobj, writefln, false, provision_default_paths(subobj),
- session.authinfo.session_info, session.authinfo.credentials);
+ var paths = provision_default_paths(subobj);
+ if (!provision(subobj, writefln, false, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
+ writefln("Provision failed!");
+ } else if (!provision_dns(subobj, writefln, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
+ writefln("DNS Provision failed!");
+ } else {
+ writefln("Provision Complete!");
+ }
}
} else {
f.display();
diff --git a/swat/install/vampire.esp b/swat/install/vampire.esp
index bd96f91962..19f99dce98 100644
--- a/swat/install/vampire.esp
+++ b/swat/install/vampire.esp
@@ -23,13 +23,12 @@ var subobj = provision_guess();
/* Don't supply default password for web interface */
subobj.ADMINPASS = "";
-f.add("REALM", "Realm");
-f.add("DOMAIN", "Domain Name");
+f.add("REALM", "DNS Domain Name");
+f.add("DOMAIN", "NetBIOS Domain Name");
f.add("ADMIN", "Administrator Username");
f.add("ADMINPASS", "Administrator Password", "password");
f.add("HOSTNAME", "My Hostname");
-f.add("HOSTGUID", "Host GUID");
-f.add("HOSTIP", "Host IP");
+f.add("HOSTIP", "My Host's IP");
f.add("DEFAULTSITE", "Default Site");
f.submit[0] = "Migrate";
f.submit[1] = "Cancel";
@@ -62,24 +61,26 @@ if (form['submit'] == "Migrate") {
creds.set_domain(form.DOMAIN);
creds.set_realm(form.REALM);
+ var paths = provision_default_paths(subobj);
+
/* Setup a basic database structure, but don't setup any users */
- if (!provision(subobj, writefln, true, provision_default_paths(subobj),
- session.authinfo.session_info, session.authinfo.credentials)) {
+ if (!provision(subobj, writefln, true, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
writefln("Provision failed!");
/* Join domain */
} else if (!join_domain(form.DOMAIN, form.HOSTNAME, misc.SEC_CHAN_BDC, creds, writefln)) {
writefln("Domain Join failed!");
+ /* Vampire */
+ } else if (!vampire(form.DOMAIN, session.authinfo.session_info,
+ session.authinfo.credentials, writefln)) {
+ writefln("Failed to syncronsise remote domain into local database!");
+ } else if (!provision_dns(subobj, writefln, paths,
+ session.authinfo.session_info, session.authinfo.credentials)) {
+ writefln("DNS Provision failed!");
} else {
- /* Vampire */
- var machine_creds = credentials_init();
- machine_creds.set_domain(form.DOMAIN);
- if (!machine_creds.set_machine_account()) {
- writefln("Failed to access newly setup domain join!");
- } else if (!vampire(machine_creds, writefln)) {
- writefln("Failed to syncronsise remote domain into local database!");
- }
+ writefln("Migration Complete!");
}
}
} else {