The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
group.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: d94120dd86f80d930be81037487de3c84eae018e $
19 *
20 * @file unlang/group.c
21 * @brief Unlang "group" keyword evaluation.
22 *
23 * @copyright 2006-2019 The FreeRADIUS server project
24 */
25RCSID("$Id: d94120dd86f80d930be81037487de3c84eae018e $")
26
27#include "unlang_priv.h"
28#include "group_priv.h"
29
31{
32 return unlang_interpret_push_children(p_result, request, frame->result, UNLANG_NEXT_SIBLING);
33}
34
36{
37 /*
38 * Ensure returns stop at the enclosing policy
39 */
40 return_point_set(frame);
41
42 return unlang_group(result, request, frame);
43}
44
45
47{
49 &(unlang_op_t){
50 .name = "group",
51 .interpret = unlang_group,
52 .debug_braces = true
53 });
54
56 &(unlang_op_t){
57 .name = "redundant",
58 .interpret = unlang_group,
59 .debug_braces = true
60 });
61
63 &(unlang_op_t){
64 .name = "policy",
65 .interpret = unlang_policy,
66 .debug_braces = true
67 });
68}
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
Definition action.h:35
#define RCSID(id)
Definition build.h:483
unlang_action_t unlang_group(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame)
Definition group.c:30
void unlang_group_init(void)
Definition group.c:46
static unlang_action_t unlang_policy(rlm_rcode_t *result, request_t *request, unlang_stack_frame_t *frame)
Definition group.c:35
Declarations for the "group" keyword.
unlang_action_t unlang_interpret_push_children(rlm_rcode_t *p_result, request_t *request, rlm_rcode_t default_rcode, bool do_next_sibling)
Push the children of the current frame onto a new frame onto the stack.
Definition interpret.c:243
void unlang_register(int type, unlang_op_t *op)
Register an operation with the interpreter.
Definition base.c:63
rlm_rcode_t
Return codes indicating the result of the module call.
Definition rcode.h:40
#define UNLANG_NEXT_SIBLING
Definition unlang_priv.h:93
static void return_point_set(unlang_stack_frame_t *frame)
@ UNLANG_TYPE_GROUP
Grouping section.
Definition unlang_priv.h:48
@ UNLANG_TYPE_POLICY
Policy section.
Definition unlang_priv.h:73
@ UNLANG_TYPE_REDUNDANT
exactly like group, but with different default return codes
Definition unlang_priv.h:49
rlm_rcode_t result
The result from executing the instruction.
An unlang operation.
Our interpreter stack, as distinct from the C stack.