summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--webapps/index.esp30
-rw-r--r--webapps/install/index.esp20
-rw-r--r--webapps/install/newuser.esp50
-rw-r--r--webapps/install/provision.esp79
-rw-r--r--webapps/install/samba3.esp106
-rw-r--r--webapps/install/vampire.esp120
-rw-r--r--webapps/logout.esp8
-rw-r--r--webapps/menu.js67
8 files changed, 0 insertions, 480 deletions
diff --git a/webapps/index.esp b/webapps/index.esp
deleted file mode 100644
index 1924e40210..0000000000
--- a/webapps/index.esp
+++ /dev/null
@@ -1,30 +0,0 @@
-<% page_header("columns", "Server Status", "main");
- libinclude("base.js");
- libinclude("management.js");
- libinclude("provision.js");
-
- if (install_ok(session.authinfo.session_info, session.authinfo.credentials) == false) {
- redirect("/install/");
- }
-
-%>
-
-<h1>Server Status</h1>
-
-<%
-var servers = new Array("nbt_server", "smb_server", "ldap_server", "cldap_server", "kdc_server");
-var i;
-var info = new Object();
-
-info["NBT Server"] = server_status("nbt");
-info["WINS Server"] = server_status("wins");
-info["CLDAP Server"] = server_status("cldap");
-info["Kerberos Server"] = server_status("kdc");
-info["SMB Server"] = stream_server_status("smb");
-info["LDAP Server"] = stream_server_status("ldap");
-info["RPC Server"] = stream_server_status("rpc");
-
-simple_table(info);
-%>
-
-<% page_footer(); %>
diff --git a/webapps/install/index.esp b/webapps/install/index.esp
deleted file mode 100644
index 5a73b7751f..0000000000
--- a/webapps/install/index.esp
+++ /dev/null
@@ -1,20 +0,0 @@
-<% page_header("columns", "Server Installation", "install");
-%>
-
-<h1>Installation</h1>
-
-Welcome to Samba4 installation. Before proceeding, you will need to
-know:
-
-<ul>
-<li>The domain name you will use
-<li>The realm name you will use
-</ul>
-
-After you have decided on those, choose the 'Provisioning' menu item
-on the left, and fill in the form.<p>
-
-<b>Warning!</b> When you provision, your existing user database is
-wiped and replaced with a new one.
-
-<% page_footer(); %>
diff --git a/webapps/install/newuser.esp b/webapps/install/newuser.esp
deleted file mode 100644
index 1b341ff665..0000000000
--- a/webapps/install/newuser.esp
+++ /dev/null
@@ -1,50 +0,0 @@
-<% page_header("columns", "Add a user", "install");
-
- include("/scripting/forms.js");
- libinclude("base.js");
- libinclude("provision.js");
-%>
-
-<h1>Add a user</h1>
-
-<%
-var f = FormObj("newuser", 0, 2);
-var i;
-var rand = random_init();
-
-f.add("USERNAME", "User Name");
-f.add("UNIXNAME", "Unix Name");
-f.add("PASSWORD", "Password", "password");
-f.add("CONFIRM", "Confirm Password", "password");
-f.submit[0] = "Add";
-f.submit[1] = "Cancel";
-
-if (form['submit'] == "Cancel") {
- redirect("/");
-}
-
-
-if (form['submit'] == "Add" &&
- form.USERNAME != undefined) {
- var goodpass = (form.CONFIRM == form.PASSWORD);
-
- if (!goodpass) {
- write("<h3>Passwords don't match. Please try again.</h3>");
- f.display();
- } else {
- if (form.UNIXNAME == undefined) {
- form.UNIXNAME = form.USERNAME;
- }
- if (form.PASSWORD == undefined) {
- form.PASSWORD = rand.randpass();
- }
- newuser(form.USERNAME, form.UNIXNAME, form.PASSWORD, writefln,
- session.authinfo.session_info, session.authinfo.credentials);
- }
-} else {
- f.display();
-}
-%>
-
-
-<% page_footer(); %>
diff --git a/webapps/install/provision.esp b/webapps/install/provision.esp
deleted file mode 100644
index ee9673d507..0000000000
--- a/webapps/install/provision.esp
+++ /dev/null
@@ -1,79 +0,0 @@
-<% page_header("columns", "Provisioning", "install");
-
- include("/scripting/forms.js");
- libinclude("base.js");
- libinclude("provision.js");
-%>
-
-<h1>Samba4 provisioning</h1>
-
-<%
-var f = FormObj("Provisioning", 0, 2);
-var i;
-var lp = loadparm_init();
-
-if (lp.get("realm") == "") {
- lp.set("realm", lp.get("workgroup") + ".example.com");
-}
-
-
-var subobj = provision_guess();
-/* Don't supply default password for web interface */
-subobj.ADMINPASS = "";
-
-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("HOSTIP", "Host IP");
-f.add("DEFAULTSITE", "Default Site");
-f.submit[0] = "Provision";
-f.submit[1] = "Cancel";
-
-if (form['submit'] == "Cancel") {
- redirect("/");
-}
-
-if (form['submit'] == "Provision") {
- for (r in form) {
- subobj[r] = form[r];
- }
-}
-
-for (i=0;i<f.element.length;i++) {
- f.element[i].value = subobj[f.element[i].name];
-}
-
-if (form['submit'] == "Provision") {
- lp.set("realm", subobj.REALM);
- var goodpass = (subobj.CONFIRM == subobj.ADMINPASS);
-
- if (!goodpass) {
- write("<h3>Passwords don't match. Please try again.</h3>");
- f.display();
- } else if (subobj.ADMINPASS == "") {
- write("<h3>You must choose an administrator password. Please try again.</h3>");
- f.display();
- } else if (!provision_validate(subobj, writefln)) {
- f.display();
- } else {
- 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();
-}
-%>
-
-
-<% page_footer(); %>
diff --git a/webapps/install/samba3.esp b/webapps/install/samba3.esp
deleted file mode 100644
index 31857c01e9..0000000000
--- a/webapps/install/samba3.esp
+++ /dev/null
@@ -1,106 +0,0 @@
-<% page_header("columns", "Upgrade", "install");
-
- /* frontend to Samba3 upgrade.
- Based on provision.esp
- (C) Jelmer Vernooij 2005
- Published under the GNU GPL
- */
-
- include("/scripting/forms.js");
- libinclude("base.js");
- libinclude("provision.js");
- libinclude("upgrade.js");
-%>
-
-<h1>Import from Samba3</h1>
-
-<%
-if (form['submit'] == "Cancel") {
- redirect("/");
-}
-
-function confirm_form()
-{
- var samba3 = samba3_read(form['LIBDIR'], form['SMBCONF']);
-
- var subobj = upgrade_provision(samba3);
- var f = FormObj("Import from Samba3", 0, 2);
- subobj.ADMINPASS = "";
-
- f.add("REALM", "Realm");
- f.add("DOMAIN", "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");
-
- for (i=0;i<f.element.length;i++) {
- f.element[i].value = subobj[f.element[i].name];
- }
-
- f.add("SMBCONF", "", "hidden", form['SMBCONF']);
- f.add("LIBDIR", "", "hidden", form['LIBDIR']);
-
- f.submit[0] = "Continue";
- f.submit[1] = "Cancel";
- f.display();
-}
-
-if (form['submit'] == "Import") {
- confirm_form();
-} else if (form['submit'] == "Continue") {
- var samba3 = samba3_read(form['LIBDIR'], form['SMBCONF']);
- assert(samba3 != undefined);
- var subobj = upgrade_provision(samba3);
- for (r in form) {
- subobj[r] = form[r];
- }
-
- var goodpass = (subobj.CONFIRM == subobj.ADMINPASS);
-
- if (!goodpass) {
- write("<h3>Passwords don't match. Please try again.</h3>");
- confirm_form();
- } else if (subobj.ADMINPASS == "") {
- write("<h3>You must choose an administrator password. Please try again.</h3>");
- confirm_form();
- } else {
- var paths = provision_default_paths(subobj);
- if (!provision(subobj, writefln, true, paths,
- session.authinfo.session_info, session.authinfo.credentials)) {
- writefln("Provision failed!");
- } else {
- var ret = upgrade(subobj,samba3,message,paths,
- session.authinfo.session_info, session.authinfo.credentials);
- if (ret > 0) {
- writefln("Failed to import %d entries\n", ret);
- } else {
- if (!provision_dns(subobj, writefln, paths,
- session.authinfo.session_info, session.authinfo.credentials)) {
- writefln("DNS Provision failed!");
- } else {
- writefln("Reloading smb.conf\n");
- var lp = loadparm_init();
- lp.reload();
- writefln("Upgrade Complete!");
- }
- }
- }
- }
-} else {
- var f = FormObj("Import from Samba3", 0, 2);
-
- f.add("SMBCONF", "smb.conf file", "text", "/etc/samba/smb.conf");
- f.add("LIBDIR", "Lib directory", "text", "/var/lib/samba");
- f.submit[0] = "Import";
- f.submit[1] = "Cancel";
-
- write('<p>Warning: This will erase your current configuration!</p>');
- f.display();
-}
-%>
-
-<% page_footer(); %>
diff --git a/webapps/install/vampire.esp b/webapps/install/vampire.esp
deleted file mode 100644
index 9ce874cd18..0000000000
--- a/webapps/install/vampire.esp
+++ /dev/null
@@ -1,120 +0,0 @@
-<% page_header("columns", "Windows to Samba Migration", "install");
-
- include("/scripting/forms.js");
- libinclude("base.js");
- libinclude("provision.js");
-
- var misc = misc_init();
-%>
-
-<h1>Windows to Samba4 domain migration</h1>
-
-<%
-var f = FormObj("Provisioning", 0, 2);
-var i;
-var lp = loadparm_init();
-
-if (lp.get("realm") == "") {
- lp.set("realm", lp.get("workgroup") + ".example.com");
-}
-
-
-var subobj = provision_guess();
-/* Don't supply default password for web interface */
-subobj.ADMINPASS = "";
-
-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("HOSTIP", "My Host's IP");
-f.add("DEFAULTSITE", "Default Site");
-f.submit[0] = "Migrate";
-f.submit[1] = "Cancel";
-
-if (form['submit'] == "Cancel") {
- redirect("/");
-}
-
-if (form['submit'] == "Migrate") {
- for (r in form) {
- subobj[r] = form[r];
- }
-}
-
-for (i=0;i<f.element.length;i++) {
- f.element[i].value = subobj[f.element[i].name];
-}
-
-if (form['submit'] == "Migrate") {
- lp.set("realm", subobj.REALM);
- if (subobj.ADMINPASS == "") {
- write("<h3>We need the administrator password for the " + subobj.DOMAIN + " domain to proceed. Please try again.</h3>");
- f.display();
- } else if (!provision_validate(subobj, writefln)) {
- f.display();
- } else if (strupper(lp.get("server role")) == "PDC") {
- writefln("You need to set 'server role' to 'member server' before starting the migration process");
- } else {
- var creds = credentials_init();
- var samdb;
- creds.set_username(form.ADMIN);
- creds.set_password(form.ADMINPASS);
- creds.set_domain(form.DOMAIN);
- creds.set_realm(form.REALM);
-
- var info = new Object();
- var paths = provision_default_paths(subobj);
- var session_info = session.authinfo.session_info;
- var credentials = session.authinfo.credentials;
-
- info.credentials = credentials;
- info.session_info = session_info;
- info.message = writefln;
- info.subobj = subobj;
-
- /* Setup a basic database structure, but don't setup any users */
- if (!provision(subobj, writefln, true, paths,
- session_info, 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 if (!(samdb = open_ldb(info, paths.samdb, false))) {
- writefln("Opening " + paths.samdb + " failed!");
- info.samdb = samdb;
- } else if (!setup_name_mappings(info, samdb)) {
- writefln("Setup of name mappings failed!");
- } else {
- var zonepath = paths.dns;
- %>
-<h3>Database migrated!</h3>
-
-You need to do the following to complete the process:
-
-<ul>
-<li>Install the <b>@@zonepath</b> zone file into your bind install, and restart bind
-<li>Change your smb.conf to set "server role = pdc"
-<li>Shutdown your existing PDC and any other DCs
-<li>Restart smbd
-</ul>
- <%
- }
- }
-} else {
- f.display();
-}
-%>
-
-
-<% page_footer(); %>
diff --git a/webapps/logout.esp b/webapps/logout.esp
deleted file mode 100644
index d0d971d962..0000000000
--- a/webapps/logout.esp
+++ /dev/null
@@ -1,8 +0,0 @@
-<%
-page_header("plain", "Logging out", "");
-
-session.AUTHENTICATED = false;
-redirect("/login.esp");
-
-page_footer();
-%>
diff --git a/webapps/menu.js b/webapps/menu.js
deleted file mode 100644
index f752c1febc..0000000000
--- a/webapps/menu.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- the menu hierarchy for SWAT
-*/
-
-include("/scripting/menus.js");
-
-swat_menus = new Object();
-
-swat_menus.main = simple_menu(
- "Main Menu",
- "Servers", session_uri("/?menu=servers"),
- "Installation", session_uri("/install/"),
- "ESP Tests", session_uri("/esptest/"),
- "Preview of new SWAT",session_uri("/index.html"));
-
-swat_menus.servers = simple_menu(
- "Servers",
- "LDAP Server", session_uri("/ldap_server/"),
- "CLDAP Server", session_uri("/cldap_server/"),
- "RPC Server", session_uri("/rpc_server/"),
- "NBT Server", session_uri("/nbt_server/"),
- "WINS Server", session_uri("/wins_server/"),
- "Kerberos Server", session_uri("/kdc_server/"));
-
-swat_menus.esptest = simple_menu(
- "ESP Tests",
- "ldb database", session_uri("/esptest/ldb.esp"),
- "samr calls", session_uri("/esptest/samr.esp"),
- "html forms", session_uri("/esptest/formtest.esp"),
- "esp includes", session_uri("/esptest/include.esp"),
- "session variables", session_uri("/esptest/session.esp"),
- "loadparm access", session_uri("/esptest/loadparm.esp"),
- "exception handling", session_uri("/esptest/exception.esp"),
- "environment variables", session_uri("/esptest/showvars.esp"),
- "registry", session_uri("/esptest/registry.esp"));
-
-swat_menus.json = simple_menu(
- "JSON Tests",
- "ldb browser", session_uri("/apps/samba/utils/ldbbrowse.html"),
- "admin console", session_uri("/apps/samba/utils/admin_console.html"));
-
-
-swat_menus.install = simple_menu(
- "Installation",
- "Provisioning", session_uri("/install/provision.esp"),
- "New User", session_uri("/install/newuser.esp"),
- "Import from Samba3", session_uri("/install/samba3.esp"),
- "Import from Windows", session_uri("/install/vampire.esp"));
-
-
-swat_menus.nbt_server = simple_menu(
- "NBT Server",
- "Statistics", session_uri("/nbt_server/index.esp"));
-
-
-swat_menus.docs = simple_menu(
- "Links",
- "Samba4 development", "http://devel.samba.org/",
- "Recent Checkins", "http://build.samba.org/?tree=samba4;function=Recent+Checkins",
- "Recent Builds", "http://build.samba.org/?tree=samba4;function=Recent+Builds",
- "EJS Information", "http://www.appwebserver.org/products/ejs/ejs.html",
- "ESP Information", "http://www.appwebserver.org/products/esp/esp.html",
- "XHTML Spec", "http://www.w3.org/TR/xhtml1/",
- "JavaScript Spec", "http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf",
- "CSS Specs", "http://www.w3.org/Style/CSS/#specs",
- "CSS1/2 Reference", "http://www.w3schools.com/css/css_reference.asp");
-