Added check for 'Realm' attribute in request->vps. If this has
authorcparker <cparker>
Thu, 28 Mar 2002 16:32:47 +0000 (16:32 +0000)
committercparker <cparker>
Thu, 28 Mar 2002 16:32:47 +0000 (16:32 +0000)
been added, we've already proxied the request and should not do
so again.  ( Bug noted by "Justin Ainsworth" <jda@sunset.net> )

src/modules/rlm_realm/rlm_realm.c

index 92c67ea..e2ecd6c 100644 (file)
@@ -78,7 +78,17 @@ static REALM *check_for_realm(void *instance, REQUEST *request)
         */
        if ((request->proxy != NULL) ||
            (request->username == NULL)) {
-               DEBUG2("    rlm_realm: Request was proxied, or no user name.  Ignoring.");
+               DEBUG2("    rlm_realm: Proxy reply, or no user name.  Ignoring.");
+               return NULL;
+       }
+
+       /*
+        *      Check for 'Realm' attribute.  If it exists, then we've proxied
+        *      it already ( via another rlm_realm instance ) and should return.
+        */
+
+       if ( (vp = pairfind(request->packet->vps, PW_REALM)) != NULL ) {
+               DEBUG2("    rlm_realm: Request already proxied.  Ignoring.");
                return NULL;
        }