More audits of the code
authorAlan T. DeKok <aland@freeradius.org>
Wed, 17 Jul 2013 10:00:22 +0000 (12:00 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 17 Jul 2013 10:00:22 +0000 (12:00 +0200)
for the same problem as the last commit

src/main/modcall.c

index 2dd29c9..bb02f6a 100644 (file)
@@ -534,7 +534,7 @@ int modcall(int component, modcallable *c, REQUEST *request)
                /*
                 *      Child is a group that has children of it's own.
                 */
-               if (child->type != MOD_SINGLE) {
+               if ((child->type > MOD_SINGLE) && (child->type <= MOD_POLICY)) {
                        int count = 1;
                        modcallable *p, *q;
 #ifdef WITH_UNLANG
@@ -872,14 +872,14 @@ static void dump_mc(modcallable *c, int indent)
                modsingle *single = mod_callabletosingle(c);
                DEBUG("%.*s%s {", indent, "\t\t\t\t\t\t\t\t\t\t\t",
                        single->modinst->name);
-       } else {
+       } else if ((c->type > MOD_SINGLE) && (c->type <= MOD_POLICY)) {
                modgroup *g = mod_callabletogroup(c);
                modcallable *p;
                DEBUG("%.*s%s {", indent, "\t\t\t\t\t\t\t\t\t\t\t",
                      group_name[c->type]);
                for(p = g->children;p;p = p->next)
                        dump_mc(p, indent+1);
-       }
+       } /* else ignore it for now */
 
        for(i = 0; i<RLM_MODULE_NUMCODES; ++i) {
                DEBUG("%.*s%s = %s", indent+1, "\t\t\t\t\t\t\t\t\t\t\t",