]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Added deprecated functionality as compile-time option
authorAlan T. DeKok <aland@freeradius.org>
Mon, 16 May 2011 11:30:20 +0000 (13:30 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 16 May 2011 11:30:20 +0000 (13:30 +0200)
src/include/radiusd.h
src/main/auth.c
src/main/modules.c
src/main/realms.c

index 0c338e07b7fe7d8f124c536206c6877ada8ee327..2809100a78e3fb7524962fc7e7fdcc630a3a1442 100644 (file)
@@ -377,6 +377,9 @@ typedef struct main_config_t {
        const char      *name;
        const char      *auth_badpass_msg;
        const char      *auth_goodpass_msg;
+#ifdef WITH_POST_PROXY_AUTHORIZE
+       int             post_proxy_authorize;
+#endif
 } MAIN_CONFIG_T;
 
 #define DEBUG  if(debug_flag)log_debug
index a74a0ce8b00766f5cea2fe77ebbdabfc082ed50e..e6adeee8fbe16ae6872a007fb08aabe06202dd8f 100644 (file)
@@ -499,6 +499,9 @@ int rad_authenticate(REQUEST *request)
                                                &request->config_items,
                                                PW_AUTH_TYPE, PW_TYPE_INTEGER);
                        if (tmp) tmp->vp_integer = PW_AUTHTYPE_ACCEPT;
+#ifdef WITH_POXT_PROXY_AUTHORIZE
+                       if (mainconfig.post_proxy_authorize) break;
+#endif
                        goto authenticate;
 
                /*
index 39f441fdf371e8167dfb8ba2e3c6b2d7087dc5bb..c299247f318f4dee012a557605b3b06866344052 100644 (file)
@@ -1559,6 +1559,19 @@ int setup_modules(int reload, CONF_SECTION *config)
  */
 int module_authorize(int autz_type, REQUEST *request)
 {
+#ifdef WITH_POST_PROXY_AUTHORIZE
+       /*
+        *      We have a proxied packet, and we've been told
+        *      to NOT pass proxied packets through 'authorize'
+        *      a second time.  So stop.
+        */
+       if ((request->proxy != NULL &&
+            mainconfig.post_proxy_authorize == FALSE)) {
+               DEBUG2(" authorize: Skipping authorize in post-proxy stage");
+               return RLM_MODULE_NOOP;
+       }
+#endif
+
        return indexed_modcall(RLM_COMPONENT_AUTZ, autz_type, request);
 }
 
index 9fac06ad4b22d283b434e94232a5bfeca485c169..3196ea4c976b8065848ec81d2e8075a5005639c1 100644 (file)
@@ -110,6 +110,11 @@ static const CONF_PARSER proxy_config[] = {
          offsetof(realm_config_t, wake_all_if_all_dead),
          NULL, "no" },
 
+#ifdef WITH_POST_PROXY_AUTHORIZE
+        { "post_proxy_authorize", PW_TYPE_BOOLEAN, 0,
+         &mainconfig.post_proxy_authorize, "yes" },
+#endif
+
        { NULL, -1, 0, NULL, NULL }
 };
 #endif