2 * modules.c Radius module support.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * Copyright 2003,2006 The FreeRADIUS server project
21 * Copyright 2000 Alan DeKok <aland@ox.org>
22 * Copyright 2000 Alan Curry <pacman@world.std.com>
25 #include <freeradius-devel/ident.h>
28 #include <freeradius-devel/radiusd.h>
29 #include <freeradius-devel/modpriv.h>
30 #include <freeradius-devel/modcall.h>
31 #include <freeradius-devel/rad_assert.h>
33 extern int check_config;
35 typedef struct indexed_modcallable {
39 modcallable *modulelist;
40 } indexed_modcallable;
43 * For each component, keep an ordered list of ones to call.
45 static rbtree_t *components = NULL;
47 static rbtree_t *module_tree = NULL;
49 static rbtree_t *instance_tree = NULL;
51 typedef struct section_type_value_t {
55 } section_type_value_t;
59 * Ordered by component
61 static const section_type_value_t section_type_value[RLM_COMPONENT_COUNT] = {
62 { "authenticate", "Auth-Type", PW_AUTH_TYPE },
63 { "authorize", "Autz-Type", PW_AUTZ_TYPE },
64 { "preacct", "Pre-Acct-Type", PW_PRE_ACCT_TYPE },
65 { "accounting", "Acct-Type", PW_ACCT_TYPE },
66 { "session", "Session-Type", PW_SESSION_TYPE },
67 { "pre-proxy", "Pre-Proxy-Type", PW_PRE_PROXY_TYPE },
68 { "post-proxy", "Post-Proxy-Type", PW_POST_PROXY_TYPE },
69 { "post-auth", "Post-Auth-Type", PW_POST_AUTH_TYPE },
72 static void indexed_modcallable_free(void *data)
74 indexed_modcallable *c = data;
76 modcallable_free(&c->modulelist);
80 static int indexed_modcallable_cmp(const void *one, const void *two)
83 const indexed_modcallable *a = one;
84 const indexed_modcallable *b = two;
86 if (a->server && !b->server) return -1;
87 if (!a->server && b->server) return +1;
88 if (a->server && b->server) {
89 rcode = strcmp(a->server, b->server);
90 if (rcode != 0) return rcode;
93 if (a->comp < b->comp) return -1;
94 if (a->comp > b->comp) return +1;
96 return a->idx - b->idx;
101 * Compare two module entries
103 static int module_instance_cmp(const void *one, const void *two)
105 const module_instance_t *a = one;
106 const module_instance_t *b = two;
108 return strcmp(a->name, b->name);
113 * Free a module instance.
115 static void module_instance_free(void *data)
117 module_instance_t *this = data;
119 if (this->entry->module->detach) {
122 (this->entry->module->detach)(this->insthandle);
123 for (i = 0; i < 16; i++) {
124 if (this->old_insthandle[i]) {
125 (this->entry->module->detach)(this->old_insthandle[i]);
130 #ifdef HAVE_PTHREAD_H
134 * The mutex MIGHT be locked...
135 * we'll check for that later, I guess.
137 pthread_mutex_destroy(this->mutex);
141 memset(this, 0, sizeof(*this));
147 * Compare two module entries
149 static int module_entry_cmp(const void *one, const void *two)
151 const module_entry_t *a = one;
152 const module_entry_t *b = two;
154 return strcmp(a->name, b->name);
158 * Free a module entry.
160 static void module_entry_free(void *data)
162 module_entry_t *this = data;
164 lt_dlclose(this->handle); /* ignore any errors */
165 memset(this, 0, sizeof(*this));
171 * Remove the module lists.
173 int detach_modules(void)
175 rbtree_free(instance_tree);
176 rbtree_free(components);
177 rbtree_free(module_tree);
186 * Find a module on disk or in memory, and link to it.
188 static module_entry_t *linkto_module(const char *module_name,
191 module_entry_t myentry;
192 module_entry_t *node;
194 char module_struct[256];
196 const module_t *module;
198 strlcpy(myentry.name, module_name, sizeof(myentry.name));
199 node = rbtree_finddata(module_tree, &myentry);
200 if (node) return node;
203 * Keep the handle around so we can dlclose() it.
205 handle = lt_dlopenext(module_name);
206 if (handle == NULL) {
207 cf_log_err(cf_sectiontoitem(cs),
208 "Failed to link to module '%s': %s\n",
209 module_name, lt_dlerror());
214 * Link to the module's rlm_FOO{} module structure.
216 * The module_name variable has the version number
217 * embedded in it, and we don't want that here.
219 strcpy(module_struct, module_name);
220 p = strrchr(module_struct, '-');
223 DEBUG3(" (Loaded %s, checking if it's valid)", module_name);
226 * libltld MAY core here, if the handle it gives us contains
229 module = lt_dlsym(handle, module_struct);
231 cf_log_err(cf_sectiontoitem(cs),
232 "Failed linking to %s structure: %s\n",
233 module_name, lt_dlerror());
238 * Before doing anything else, check if it's sane.
240 if (module->magic != RLM_MODULE_MAGIC_NUMBER) {
242 cf_log_err(cf_sectiontoitem(cs),
243 "Invalid version in module '%s'",
249 /* make room for the module type */
250 node = rad_malloc(sizeof(*node));
251 memset(node, 0, sizeof(*node));
252 strlcpy(node->name, module_name, sizeof(node->name));
253 node->module = module;
254 node->handle = handle;
256 cf_log_module(cs, "Linked to module %s", module_name);
259 * Add the module as "rlm_foo-version" to the configuration
262 if (!rbtree_insert(module_tree, node)) {
263 radlog(L_ERR, "Failed to cache module %s", module_name);
273 * Find a module instance.
275 module_instance_t *find_module_instance(CONF_SECTION *modules,
276 const char *instname)
279 const char *name1, *name2;
280 module_instance_t *node, myNode;
281 char module_name[256];
283 if (!modules) return NULL;
286 * Module instances are declared in the modules{} block
287 * and referenced later by their name, which is the
288 * name2 from the config section, or name1 if there was
291 cs = cf_section_sub_find_name2(modules, NULL, instname);
293 radlog(L_ERR, "ERROR: Cannot find a configuration entry for module \"%s\".\n", instname);
298 * If there's already a module instance, return it.
300 strlcpy(myNode.name, instname, sizeof(myNode.name));
301 node = rbtree_finddata(instance_tree, &myNode);
302 if (node) return node;
304 name1 = cf_section_name1(cs);
305 name2 = cf_section_name2(cs);
308 * Found the configuration entry.
310 node = rad_malloc(sizeof(*node));
311 memset(node, 0, sizeof(*node));
313 node->insthandle = NULL;
316 * Names in the "modules" section aren't prefixed
317 * with "rlm_", so we add it here.
319 snprintf(module_name, sizeof(module_name), "rlm_%s", name1);
321 node->entry = linkto_module(module_name, cs);
324 /* linkto_module logs any errors */
328 if (check_config && (node->entry->module->instantiate) &&
329 (node->entry->module->type & RLM_TYPE_CHECK_CONFIG_SAFE) == 0) {
330 cf_log_module(cs, "Skipping instantiation of %s", instname);
332 cf_log_module(cs, "Instantiating %s", instname);
336 * Call the module's instantiation routine.
338 if ((node->entry->module->instantiate) &&
340 ((node->entry->module->type & RLM_TYPE_CHECK_CONFIG_SAFE) != 0)) &&
341 ((node->entry->module->instantiate)(cs, &node->insthandle) < 0)) {
342 cf_log_err(cf_sectiontoitem(cs),
343 "Instantiation failed for module \"%s\"",
350 * We're done. Fill in the rest of the data structure,
351 * and link it to the module instance list.
353 strlcpy(node->name, instname, sizeof(node->name));
355 #ifdef HAVE_PTHREAD_H
357 * If we're threaded, check if the module is thread-safe.
359 * If it isn't, we create a mutex.
361 if ((node->entry->module->type & RLM_TYPE_THREAD_UNSAFE) != 0) {
362 node->mutex = (pthread_mutex_t *) rad_malloc(sizeof(pthread_mutex_t));
364 * Initialize the mutex.
366 pthread_mutex_init(node->mutex, NULL);
369 * The module is thread-safe. Don't give it a mutex.
375 rbtree_insert(instance_tree, node);
380 static indexed_modcallable *lookup_by_index(const char *server, int comp,
383 indexed_modcallable myc;
389 return rbtree_finddata(components, &myc);
393 * Create a new sublist.
395 static indexed_modcallable *new_sublist(const char *server, int comp, int idx)
397 indexed_modcallable *c;
399 c = lookup_by_index(server, comp, idx);
401 /* It is an error to try to create a sublist that already
402 * exists. It would almost certainly be caused by accidental
403 * duplication in the config file.
405 * index 0 is the exception, because it is used when we want
406 * to collect _all_ listed modules under a single index by
407 * default, which is currently the case in all components
408 * except authenticate. */
416 c = rad_malloc(sizeof(*c));
417 c->modulelist = NULL;
422 if (!rbtree_insert(components, c)) {
430 int indexed_modcall(int comp, int idx, REQUEST *request)
433 indexed_modcallable *this;
434 modcallable *list = NULL;
436 this = lookup_by_index(request->server, comp, idx);
438 if (idx != 0) DEBUG2(" WARNING: Unknown value specified for %s. Cannot perform requested action.",
439 section_type_value[comp].typename);
441 list = this->modulelist;
444 request->component = section_type_value[comp].section;
446 rcode = modcall(comp, list, request);
448 request->module = "<server-core>";
449 request->component = "<server-core>";
454 * Load a sub-module list, as found inside an Auth-Type foo {}
457 static int load_subcomponent_section(modcallable *parent, CONF_SECTION *cs,
458 const char *server, int comp)
460 indexed_modcallable *subcomp;
463 const char *name2 = cf_section_name2(cs);
465 rad_assert(comp >= RLM_COMPONENT_AUTH);
466 rad_assert(comp <= RLM_COMPONENT_COUNT);
472 cf_log_err(cf_sectiontoitem(cs),
473 "No name specified for %s block",
474 section_type_value[comp].typename);
481 ml = compile_modgroup(parent, comp, cs);
487 * We must assign a numeric index to this subcomponent.
488 * It is generated and placed in the dictionary
489 * automatically. If it isn't found, it's a serious
492 dval = dict_valbyname(section_type_value[comp].attr, name2);
494 cf_log_err(cf_sectiontoitem(cs),
495 "%s %s Not previously configured",
496 section_type_value[comp].typename, name2);
497 modcallable_free(&ml);
501 subcomp = new_sublist(server, comp, dval->value);
503 modcallable_free(&ml);
507 subcomp->modulelist = ml;
511 static int define_type(const DICT_ATTR *dattr, const char *name)
517 * If the value already exists, don't
520 dval = dict_valbyname(dattr->attr, name);
524 * Create a new unique value with a
525 * meaningless number. You can't look at
526 * it from outside of this code, so it
527 * doesn't matter. The only requirement
528 * is that it's unique.
531 value = fr_rand() & 0x00ffffff;
532 } while (dict_valbyattr(dattr->attr, value));
534 if (dict_addvalue(name, dattr->name, value) < 0) {
535 radlog(L_ERR, "%s", librad_errstr);
542 static int load_component_section(CONF_SECTION *cs,
543 const char *server, int comp)
548 indexed_modcallable *subcomp;
550 const char *visiblename;
551 const DICT_ATTR *dattr;
554 * Find the attribute used to store VALUEs for this section.
556 dattr = dict_attrbyvalue(section_type_value[comp].attr);
558 cf_log_err(cf_sectiontoitem(cs),
559 "No such attribute %s",
560 section_type_value[comp].typename);
565 * Loop over the entries in the named section, loading
566 * the sections this time.
568 for (modref = cf_item_find_next(cs, NULL);
570 modref = cf_item_find_next(cs, modref)) {
572 CONF_PAIR *cp = NULL;
573 CONF_SECTION *scs = NULL;
575 if (cf_item_is_section(modref)) {
576 scs = cf_itemtosection(modref);
578 name1 = cf_section_name1(scs);
581 section_type_value[comp].typename) == 0) {
582 if (!load_subcomponent_section(NULL, scs,
584 return -1; /* FIXME: memleak? */
591 } else if (cf_item_is_pair(modref)) {
592 cp = cf_itemtopair(modref);
595 continue; /* ignore it */
599 * Try to compile one entry.
601 this = compile_modsingle(NULL, comp, modref, &modname);
603 cf_log_err(cf_sectiontoitem(cs),
604 "Errors parsing %s section.\n",
605 cf_section_name1(cs));
610 * Look for Auth-Type foo {}, which are special
611 * cases of named sections, and allowable ONLY
614 * i.e. They're not allowed in a "group" or "redundant"
617 if (comp == RLM_COMPONENT_AUTH) {
619 const char *modrefname = NULL;
621 modrefname = cf_pair_attr(cp);
623 modrefname = cf_section_name2(scs);
625 modcallable_free(&this);
626 cf_log_err(cf_sectiontoitem(cs),
627 "Errors parsing %s sub-section.\n",
628 cf_section_name1(scs));
633 dval = dict_valbyname(PW_AUTH_TYPE, modrefname);
636 * It's a section, but nothing we
639 modcallable_free(&this);
640 cf_log_err(cf_sectiontoitem(cs),
641 "Unknown Auth-Type \"%s\" in %s sub-section.",
642 modrefname, section_type_value[comp].section);
647 /* See the comment in new_sublist() for explanation
648 * of the special index 0 */
652 subcomp = new_sublist(server, comp, idx);
653 if (subcomp == NULL) {
654 modcallable_free(&this);
658 /* If subcomp->modulelist is NULL, add_to_modcallable will
660 visiblename = cf_section_name2(cs);
661 if (visiblename == NULL)
662 visiblename = cf_section_name1(cs);
663 add_to_modcallable(&subcomp->modulelist, this,
670 static int load_byserver(CONF_SECTION *cs)
673 const char *server = cf_section_name2(cs);
675 cf_log_info(cs, " modules {");
678 * Define types first.
680 for (comp = 0; comp < RLM_COMPONENT_COUNT; ++comp) {
685 subcs = cf_section_sub_find(cs,
686 section_type_value[comp].section);
687 if (!subcs) continue;
689 if (cf_item_find_next(subcs, NULL) == NULL) continue;
692 * Find the attribute used to store VALUEs for this section.
694 dattr = dict_attrbyvalue(section_type_value[comp].attr);
696 cf_log_err(cf_sectiontoitem(subcs),
697 "No such attribute %s",
698 section_type_value[comp].typename);
699 cf_log_info(cs, " }");
704 * Define dynamic types, so that others can reference
707 for (modref = cf_item_find_next(subcs, NULL);
709 modref = cf_item_find_next(subcs, modref)) {
711 CONF_SECTION *subsubcs;
714 * Create types for simple references
715 * only when parsing the authenticate
718 if ((section_type_value[comp].attr == PW_AUTH_TYPE) &&
719 cf_item_is_pair(modref)) {
720 CONF_PAIR *cp = cf_itemtopair(modref);
721 if (!define_type(dattr, cf_pair_attr(cp))) {
728 if (!cf_item_is_section(modref)) continue;
730 subsubcs = cf_itemtosection(modref);
731 name1 = cf_section_name1(subsubcs);
733 if (strcmp(name1, section_type_value[comp].typename) == 0) {
734 if (!define_type(dattr,
735 cf_section_name2(subsubcs))) {
736 cf_log_info(cs, " }");
741 } /* loop over components */
744 * Loop over all of the known components, finding their
745 * configuration section, and loading it.
748 for (comp = 0; comp < RLM_COMPONENT_COUNT; ++comp) {
751 subcs = cf_section_sub_find(cs,
752 section_type_value[comp].section);
753 if (!subcs) continue;
755 if (cf_item_find_next(subcs, NULL) == NULL) continue;
757 cf_log_module(cs, "Checking %s {...} for more modules to load",
758 section_type_value[comp].section);
760 if (load_component_section(subcs, server, comp) < 0) {
761 cf_log_info(cs, " }");
765 } /* loop over components */
768 * We haven't loaded any of the normal sections. Maybe we're
769 * supposed to load the vmps section.
771 * This is a bit of a hack...
776 subcs = cf_section_sub_find(cs, "vmps");
778 cf_log_module(cs, "Checking vmps {...} for more modules to load");
779 if (load_component_section(subcs, server,
780 RLM_COMPONENT_POST_AUTH) < 0) {
787 cf_log_info(cs, " }");
789 if (!flag && server) {
790 DEBUG("WARNING: Server %s is empty, and will do nothing!",
798 int module_hup(CONF_SECTION *modules)
803 module_instance_t *node;
805 static int insthandle_counter = -1;
806 static time_t hup_times[16];
808 if (!modules) return 0;
810 if (insthandle_counter < 0) {
811 memset(hup_times, 0, sizeof(hup_times));
812 insthandle_counter = 0;
818 * Loop over the modules
820 for (ci=cf_item_find_next(modules, NULL);
822 ci=cf_item_find_next(modules, ci)) {
824 void *insthandle = NULL;
825 const char *instname;
826 module_instance_t myNode;
829 * If it's not a section, ignore it.
831 if (!cf_item_is_section(ci)) continue;
833 cs = cf_itemtosection(ci);
834 instname = cf_section_name2(cs);
835 if (!instname) instname = cf_section_name1(cs);
837 strlcpy(myNode.name, instname, sizeof(myNode.name));
838 node = rbtree_finddata(instance_tree, &myNode);
840 !node->entry->module->instantiate ||
841 ((node->entry->module->type & RLM_TYPE_HUP_SAFE) == 0)) {
845 cf_log_module(cs, "Trying to reload module \"%s\"", node->name);
847 if ((node->entry->module->instantiate)(cs, &insthandle) < 0) {
848 cf_log_err(cf_sectiontoitem(cs),
849 "HUP failed for module \"%s\". Using old configuration.",
854 radlog(L_INFO, " Module: Reloaded module \"%s\"", node->name);
857 * Free all configurations old enough to be
858 * deleted. This is slightly wasteful, but easy
861 * We permit HUPs every 5s, and we cache the last
862 * 16 configurations. So the current entry at
863 * insthandle_counter will either be empty, OR will
864 * be at least (5*16) = 80s old. The following check
865 * ensures that it will be deleted.
867 for (i = 0; i < 16; i++) {
868 if ((int) (when - hup_times[insthandle_counter]) < 60)
871 if (!node->old_insthandle[i]) continue;
873 cf_section_parse_free(cs, node->old_insthandle[i]);
875 if (node->entry->module->detach) {
876 (node->entry->module->detach)(node->old_insthandle[i]);
878 node->old_insthandle[i] = NULL;
882 * Save the old instance handle for later deletion.
884 node->old_insthandle[insthandle_counter] = node->insthandle;
885 node->insthandle = insthandle;
888 * FIXME: Set a timeout to come back in 60s, so that
889 * we can pro-actively clean up the old instances.
894 * Remember when we were last HUP'd.
896 hup_times[insthandle_counter] = when;
897 insthandle_counter++;
898 insthandle_counter &= 0x0f;
905 * Parse the module config sections, and load
906 * and call each module's init() function.
908 * Libtool makes your life a LOT easier, especially with libltdl.
909 * see: http://www.gnu.org/software/libtool/
911 int setup_modules(int reload, CONF_SECTION *config)
913 CONF_SECTION *cs, *modules;
914 rad_listen_t *listener;
915 int null_server = FALSE;
917 if (reload) return 0;
920 * If necessary, initialize libltdl.
924 * Set the default list of preloaded symbols.
925 * This is used to initialize libltdl's list of
928 * i.e. Static modules.
930 LTDL_SET_PRELOADED_SYMBOLS();
932 if (lt_dlinit() != 0) {
933 radlog(L_ERR, "Failed to initialize libraries: %s\n",
939 * Set the search path to ONLY our library directory.
940 * This prevents the modules from being found from
941 * any location on the disk.
943 lt_dlsetsearchpath(radlib_dir);
946 * Set up the internal module struct.
948 module_tree = rbtree_create(module_entry_cmp,
949 module_entry_free, 0);
951 radlog(L_ERR, "Failed to initialize modules\n");
955 instance_tree = rbtree_create(module_instance_cmp,
956 module_instance_free, 0);
957 if (!instance_tree) {
958 radlog(L_ERR, "Failed to initialize modules\n");
963 components = rbtree_create(indexed_modcallable_cmp,
964 indexed_modcallable_free, 0);
966 radlog(L_ERR, "Failed to initialize components\n");
971 * Remember where the modules were stored.
973 modules = cf_section_sub_find(config, "modules");
975 radlog(L_ERR, "Cannot find a \"modules\" section in the configuration file!");
979 DEBUG2("%s: #### Instantiating modules ####", mainconfig.name);
982 * Look for the 'instantiate' section, which tells us
983 * the instantiation order of the modules, and also allows
984 * us to load modules with no authorize/authenticate/etc.
987 cs = cf_section_sub_find(config, "instantiate");
991 module_instance_t *module;
994 cf_log_info(cs, " instantiate {");
997 * Loop over the items in the 'instantiate' section.
999 for (ci=cf_item_find_next(cs, NULL);
1001 ci=cf_item_find_next(cs, ci)) {
1004 * Skip sections and "other" stuff.
1005 * Sections will be handled later, if
1006 * they're referenced at all...
1008 if (!cf_item_is_pair(ci)) {
1012 cp = cf_itemtopair(ci);
1013 name = cf_pair_attr(cp);
1014 module = find_module_instance(modules, name);
1018 } /* loop over items in the subsection */
1020 cf_log_info(cs, " }");
1021 } /* if there's an 'instantiate' section. */
1024 * Loop over the listeners, figuring out which sections
1027 for (listener = mainconfig.listen;
1029 listener = listener->next) {
1032 if (listener->type == RAD_LISTEN_PROXY) continue;
1034 cs = cf_section_sub_find_name2(config,
1035 "server", listener->server);
1036 if (!cs && (listener->server != NULL)) {
1037 listener->print(listener, buffer, sizeof(buffer));
1039 radlog(L_ERR, "No server has been defined for %s", buffer);
1044 DEBUG2("%s: #### Loading Virtual Servers ####", mainconfig.name);
1047 * Load all of the virtual servers.
1049 for (cs = cf_subsection_find_next(config, NULL, "server");
1051 cs = cf_subsection_find_next(config, cs, "server")) {
1052 const char *name2 = cf_section_name2(cs);
1055 cf_log_info(cs, "server %s {", name2);
1057 cf_log_info(cs, "server {");
1060 if (load_byserver(cs) < 0) {
1061 cf_log_info(cs, "}");
1064 cf_log_info(cs, "}");
1068 * No empty server defined. Try to load an old-style
1069 * one for backwards compatibility.
1072 cf_log_info(cs, "server {");
1073 if (load_byserver(config) < 0) {
1074 cf_log_info(cs, "}");
1077 cf_log_info(cs, "}");
1084 * Call all authorization modules until one returns
1085 * somethings else than RLM_MODULE_OK
1087 int module_authorize(int autz_type, REQUEST *request)
1089 return indexed_modcall(RLM_COMPONENT_AUTZ, autz_type, request);
1093 * Authenticate a user/password with various methods.
1095 int module_authenticate(int auth_type, REQUEST *request)
1097 return indexed_modcall(RLM_COMPONENT_AUTH, auth_type, request);
1101 * Do pre-accounting for ALL configured sessions
1103 int module_preacct(REQUEST *request)
1105 return indexed_modcall(RLM_COMPONENT_PREACCT, 0, request);
1109 * Do accounting for ALL configured sessions
1111 int module_accounting(int acct_type, REQUEST *request)
1113 return indexed_modcall(RLM_COMPONENT_ACCT, acct_type, request);
1117 * See if a user is already logged in.
1119 * Returns: 0 == OK, 1 == double logins, 2 == multilink attempt
1121 int module_checksimul(int sess_type, REQUEST *request, int maxsimul)
1125 if(!request->username)
1128 request->simul_count = 0;
1129 request->simul_max = maxsimul;
1130 request->simul_mpp = 1;
1132 rcode = indexed_modcall(RLM_COMPONENT_SESS, sess_type, request);
1134 if (rcode != RLM_MODULE_OK) {
1135 /* FIXME: Good spot for a *rate-limited* warning to the log */
1139 return (request->simul_count < maxsimul) ? 0 : request->simul_mpp;
1143 * Do pre-proxying for ALL configured sessions
1145 int module_pre_proxy(int type, REQUEST *request)
1147 return indexed_modcall(RLM_COMPONENT_PRE_PROXY, type, request);
1151 * Do post-proxying for ALL configured sessions
1153 int module_post_proxy(int type, REQUEST *request)
1155 return indexed_modcall(RLM_COMPONENT_POST_PROXY, type, request);
1159 * Do post-authentication for ALL configured sessions
1161 int module_post_auth(int postauth_type, REQUEST *request)
1163 return indexed_modcall(RLM_COMPONENT_POST_AUTH, postauth_type, request);