r9177: setup a credentials object in authinfo on login
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Aug 2005 07:00:27 +0000 (07:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:31:28 +0000 (13:31 -0500)
(This used to be commit c1ef18a590d2f7af4b64c1775376a05da80ac242)

swat/login.esp

index ae9a35824314fed77f02b2d7f103df5fdf1d57e4..4b40793923980b9f2e16cead66b6ff51fff9a170 100644 (file)
@@ -22,7 +22,6 @@ f.display();
 
 <%
        if (request.REQUEST_METHOD == "POST") {
-
                var authinfo = new Object();
                authinfo.username = form.Username;
                authinfo.password = form.Password;
@@ -33,14 +32,16 @@ f.display();
                if (auth == undefined) {
                        write("<b>Invalid login - please try again<br /></b>\n");
                } else if (auth.result) {
-
-                       /* for now just authenticate everyone */
                        session.AUTHENTICATED = true;
                        session.authinfo = new Object();
 
                        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);
+                       
                        /* if the user was asking for the login page, then now
                           redirect them to the main page. Otherwise just
                           redirect them to the current page, which will now