From: Alan T. DeKok Date: Thu, 27 Jul 2017 13:53:37 +0000 (-0400) Subject: fix authenticate hacks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7af2886f2074debecb82c2d1a441a411672131df;p=thirdparty%2Ffreeradius-server.git fix authenticate hacks the thing in "authenticate" are no longer bare modules. They are now always subsections --- diff --git a/src/main/unlang_compile.c b/src/main/unlang_compile.c index 36a0d03198d..3bf84ac8155 100644 --- a/src/main/unlang_compile.c +++ b/src/main/unlang_compile.c @@ -380,35 +380,6 @@ defaultactions[MOD_COUNT][UNLANG_GROUP_TYPE_MAX][RLM_MODULE_NUMCODES] = #endif }; -static const int authtype_actions[UNLANG_GROUP_TYPE_MAX][RLM_MODULE_NUMCODES] = -{ - /* group */ - { - MOD_ACTION_RETURN, /* reject */ - MOD_ACTION_RETURN, /* fail */ - 4, /* ok */ - MOD_ACTION_RETURN, /* handled */ - MOD_ACTION_RETURN, /* invalid */ - MOD_ACTION_RETURN, /* userlock */ - 1, /* notfound */ - 2, /* noop */ - 3 /* updated */ - }, - /* redundant */ - { - MOD_ACTION_RETURN, /* reject */ - 1, /* fail */ - MOD_ACTION_RETURN, /* ok */ - MOD_ACTION_RETURN, /* handled */ - MOD_ACTION_RETURN, /* invalid */ - MOD_ACTION_RETURN, /* userlock */ - MOD_ACTION_RETURN, /* notfound */ - MOD_ACTION_RETURN, /* noop */ - MOD_ACTION_RETURN /* updated */ - } -}; - - #ifdef WITH_UNLANG static bool pass2_fixup_xlat(CONF_ITEM const *ci, vp_tmpl_t **pvpt, bool convert, fr_dict_attr_t const *da) @@ -3070,7 +3041,7 @@ int unlang_compile(CONF_SECTION *cs, rlm_components_t component) if (component != MOD_AUTHENTICATE) { unlang_ctx.actions = &defaultactions[component]; } else { - unlang_ctx.actions = &authtype_actions; + unlang_ctx.actions = &defaultactions[MOD_AUTHORIZE]; } c = compile_group(NULL, &unlang_ctx, cs, UNLANG_GROUP_TYPE_SIMPLE, UNLANG_GROUP_TYPE_SIMPLE, UNLANG_TYPE_GROUP);