r9501: fixed the SWAT login page for the changes to the userAuth() function that...
authorAndrew Tridgell <tridge@samba.org>
Tue, 23 Aug 2005 02:12:21 +0000 (02:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:34:23 +0000 (13:34 -0500)
earlier today

swat/login.esp

index 4b40793923980b9f2e16cead66b6ff51fff9a170..f263ef60776a82b169b353b28f3f4562b584c03c 100644 (file)
@@ -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