The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
mod_action.c
Go to the documentation of this file.
1/*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
15 */
16
17/**
18 * $Id: dc85eae620ee75502a09189f0f805b9ec20d1702 $
19 *
20 * @file unlang/action.c
21 * @brief Default action sets for virtual server actions.
22 *
23 * @copyright 2024 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
24 */
25RCSID("$Id: dc85eae620ee75502a09189f0f805b9ec20d1702 $")
26
27#include <freeradius-devel/unlang/mod_action.h>
28#include <freeradius-devel/server/rcode.h>
29
45
61
77
92
108
109#ifdef __clang__
110#pragma clang diagnostic ignored "-Wgnu-designator"
111#endif
112
114 [MOD_ACTION_NOT_SET] = "not-set",
115 [MOD_ACTION_RETRY] = "retry",
116 [MOD_ACTION_REJECT] = "reject",
117 [MOD_ACTION_RETURN] = "return",
118
119 [4 ... 0x80] = "<INVALID>",
120
121 // zsh: for x ({1..64}); do print -n "[MOD_PRIORITY($x)] = \"$x\", "; done
122 [MOD_PRIORITY(1)] = "1", [MOD_PRIORITY(2)] = "2", [MOD_PRIORITY(3)] = "3", [MOD_PRIORITY(4)] = "4",
123 [MOD_PRIORITY(5)] = "5", [MOD_PRIORITY(6)] = "6", [MOD_PRIORITY(7)] = "7", [MOD_PRIORITY(8)] = "8",
124 [MOD_PRIORITY(9)] = "9", [MOD_PRIORITY(10)] = "10", [MOD_PRIORITY(11)] = "11", [MOD_PRIORITY(12)] = "12",
125 [MOD_PRIORITY(13)] = "13", [MOD_PRIORITY(14)] = "14", [MOD_PRIORITY(15)] = "15", [MOD_PRIORITY(16)] = "16",
126 [MOD_PRIORITY(17)] = "17", [MOD_PRIORITY(18)] = "18", [MOD_PRIORITY(19)] = "19", [MOD_PRIORITY(20)] = "20",
127 [MOD_PRIORITY(21)] = "21", [MOD_PRIORITY(22)] = "22", [MOD_PRIORITY(23)] = "23", [MOD_PRIORITY(24)] = "24",
128 [MOD_PRIORITY(25)] = "25", [MOD_PRIORITY(26)] = "26", [MOD_PRIORITY(27)] = "27", [MOD_PRIORITY(28)] = "28",
129 [MOD_PRIORITY(29)] = "29", [MOD_PRIORITY(30)] = "30", [MOD_PRIORITY(31)] = "31", [MOD_PRIORITY(32)] = "32",
130 [MOD_PRIORITY(33)] = "33", [MOD_PRIORITY(34)] = "34", [MOD_PRIORITY(35)] = "35", [MOD_PRIORITY(36)] = "36",
131 [MOD_PRIORITY(37)] = "37", [MOD_PRIORITY(38)] = "38", [MOD_PRIORITY(39)] = "39", [MOD_PRIORITY(40)] = "40",
132 [MOD_PRIORITY(41)] = "41", [MOD_PRIORITY(42)] = "42", [MOD_PRIORITY(43)] = "43", [MOD_PRIORITY(44)] = "44",
133 [MOD_PRIORITY(45)] = "45", [MOD_PRIORITY(46)] = "46", [MOD_PRIORITY(47)] = "47", [MOD_PRIORITY(48)] = "48",
134 [MOD_PRIORITY(49)] = "49", [MOD_PRIORITY(50)] = "50", [MOD_PRIORITY(51)] = "51", [MOD_PRIORITY(52)] = "52",
135 [MOD_PRIORITY(53)] = "53", [MOD_PRIORITY(54)] = "54", [MOD_PRIORITY(55)] = "55", [MOD_PRIORITY(56)] = "56",
136 [MOD_PRIORITY(57)] = "57", [MOD_PRIORITY(58)] = "58", [MOD_PRIORITY(59)] = "59", [MOD_PRIORITY(60)] = "60",
137 [MOD_PRIORITY(61)] = "61", [MOD_PRIORITY(62)] = "62", [MOD_PRIORITY(63)] = "63", [MOD_PRIORITY(64)] = "64",
138};
#define RCSID(id)
Definition build.h:485
unlang_mod_actions_t const mod_actions_preacct
Definition mod_action.c:62
const char * mod_action_name[MOD_PRIORITY_MAX+1]
Definition mod_action.c:113
unlang_mod_actions_t const mod_actions_authenticate
Definition mod_action.c:30
unlang_mod_actions_t const mod_actions_accounting
Definition mod_action.c:78
unlang_mod_actions_t const mod_actions_authorize
Definition mod_action.c:46
unlang_mod_actions_t const mod_actions_postauth
Definition mod_action.c:93
@ MOD_ACTION_NOT_SET
default "not set by anything"
Definition mod_action.h:37
@ MOD_ACTION_RETURN
stop processing the section, and return the rcode with unset priority
Definition mod_action.h:40
@ MOD_ACTION_REJECT
change the rcode to REJECT, with unset priority
Definition mod_action.h:39
@ MOD_PRIORITY_MAX
Definition mod_action.h:56
@ MOD_ACTION_RETRY
retry the instruction, MUST also set a retry config
Definition mod_action.h:38
#define MOD_PRIORITY(_x)
Definition mod_action.h:34
unlang_mod_action_t actions[RLM_MODULE_NUMCODES]
Definition mod_action.h:64
@ RLM_MODULE_INVALID
The module considers the request invalid.
Definition rcode.h:47
@ RLM_MODULE_OK
The module is OK, continue.
Definition rcode.h:45
@ RLM_MODULE_FAIL
Module failed, don't reply.
Definition rcode.h:44
@ RLM_MODULE_DISALLOW
Reject the request (user is locked out).
Definition rcode.h:48
@ RLM_MODULE_REJECT
Immediately reject the request.
Definition rcode.h:43
@ RLM_MODULE_TIMEOUT
Module (or section) timed out.
Definition rcode.h:52
@ RLM_MODULE_NOTFOUND
User not found.
Definition rcode.h:49
@ RLM_MODULE_UPDATED
OK (pairs modified).
Definition rcode.h:51
@ RLM_MODULE_NOOP
Module succeeded without doing anything.
Definition rcode.h:50
@ RLM_MODULE_HANDLED
The module handled the request, so stop.
Definition rcode.h:46
#define RETRY_INIT
Definition retry.h:39