summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-01-10 09:21:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:50:01 -0500
commit8f86ddcd930e5f9214777e5b761e6eb1748b8e74 (patch)
tree611d8238a67ac0ba73dad2ecd63bf058cdb74c48 /swat
parent4f06be612369862d0005c68c3658c3ed18b7883d (diff)
downloadsamba-8f86ddcd930e5f9214777e5b761e6eb1748b8e74.tar.gz
samba-8f86ddcd930e5f9214777e5b761e6eb1748b8e74.tar.bz2
samba-8f86ddcd930e5f9214777e5b761e6eb1748b8e74.zip
r12819: Fix swat authentication again. We need to pass the socket_address
structure around, so the auth code knows where the request came from. Andrew Bartlett (This used to be commit 7a7b2668c00d4d22bcf8aa3ba256af88f70c38c4)
Diffstat (limited to 'swat')
-rw-r--r--swat/login.esp7
1 files changed, 5 insertions, 2 deletions
diff --git a/swat/login.esp b/swat/login.esp
index f263ef6077..8d6c049d02 100644
--- a/swat/login.esp
+++ b/swat/login.esp
@@ -28,7 +28,7 @@ f.display();
creds.set_domain(form.Domain);
creds.set_workstation(request['REMOTE_HOST']);
- auth = userAuth(creds);
+ auth = userAuth(creds, request['REMOTE_SOCKET_ADDRESS']);
if (auth == undefined) {
write("<b>Invalid login - please try again<br /></b>\n");
} else if (auth.result) {
@@ -38,6 +38,7 @@ f.display();
session.authinfo.username = auth.username;
session.authinfo.domain = auth.domain;
session.authinfo.credentials = creds;
+ session.authinfo.session_info = auth.session_info;
/* if the user was asking for the login page, then now
redirect them to the main page. Otherwise just
@@ -48,8 +49,10 @@ f.display();
} else {
redirect(session_uri(request.REQUEST_URI));
}
- } else {
+ } else if (auth.report == undefined) {
write("<b>Login failed - please try again<br /></b>\n");
+ } else {
+ write("<b>Login failed: " + auth.report + " - please try again<br /></b>\n");
}
}
%>