summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-23 02:12:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:23 -0500
commit27a09eaaab1d147ecad069a0d6645ad5c1c393c6 (patch)
tree71971329b83212921084ba157360679ce8ec4881
parentd857d1a9650efdf26b49e3939721dfc6fc0a1edb (diff)
downloadsamba-27a09eaaab1d147ecad069a0d6645ad5c1c393c6.tar.gz
samba-27a09eaaab1d147ecad069a0d6645ad5c1c393c6.tar.bz2
samba-27a09eaaab1d147ecad069a0d6645ad5c1c393c6.zip
r9501: fixed the SWAT login page for the changes to the userAuth() function that Mimir made
earlier today (This used to be commit 10b1f95790f2769cdc0e1c6f051cb7cc73f07d69)
-rw-r--r--swat/login.esp17
1 files changed, 7 insertions, 10 deletions
diff --git a/swat/login.esp b/swat/login.esp
index 4b40793923..f263ef6077 100644
--- a/swat/login.esp
+++ b/swat/login.esp
@@ -22,13 +22,13 @@ f.display();
<%
if (request.REQUEST_METHOD == "POST") {
- var authinfo = new Object();
- authinfo.username = form.Username;
- authinfo.password = form.Password;
- authinfo.domain = form.Domain;
- authinfo.rhost = request['REMOTE_HOST'];
+ var creds = credentials_init();
+ creds.set_username(form.Username);
+ creds.set_password(form.Password);
+ creds.set_domain(form.Domain);
+ creds.set_workstation(request['REMOTE_HOST']);
- auth = userAuth(authinfo);
+ auth = userAuth(creds);
if (auth == undefined) {
write("<b>Invalid login - please try again<br /></b>\n");
} else if (auth.result) {
@@ -37,10 +37,7 @@ f.display();
session.authinfo.username = auth.username;
session.authinfo.domain = auth.domain;
- session.authinfo.credentials = credentials_init();
- session.authinfo.credentials.set_username(authinfo.username);
- session.authinfo.credentials.set_domain(authinfo.domain);
- session.authinfo.credentials.set_password(authinfo.password);
+ session.authinfo.credentials = creds;
/* if the user was asking for the login page, then now
redirect them to the main page. Otherwise just