|
static int | apply_edits_to_leaf (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | apply_edits_to_list (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | check_lhs (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | check_lhs_nested (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | check_lhs_value (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | check_rhs (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
| DECLARE (check_lhs) |
|
| DECLARE (check_lhs_nested) |
|
| DECLARE (check_lhs_value) |
|
| DECLARE (expand_lhs) |
|
| DECLARE (expanded_lhs_attribute) |
|
| DECLARE (expanded_lhs_value) |
|
static int | edit_create_lhs_vp (request_t *request, TALLOC_CTX *ctx, edit_map_t *current) |
|
static void | edit_debug_attr_list (request_t *request, fr_pair_list_t const *list, map_t const *map) |
|
static void | edit_debug_attr_vp (request_t *request, fr_pair_t *vp, map_t const *map) |
|
static int | edit_delete_lhs (request_t *request, edit_map_t *current, bool delete) |
|
static fr_pair_t * | edit_list_pair_build (fr_pair_t *parent, fr_dcursor_t *cursor, fr_dict_attr_t const *da, void *uctx) |
| Simple pair building callback for use with tmpl_dcursors. More...
|
|
static void | edit_state_init_internal (request_t *request, unlang_frame_state_edit_t *state, fr_edit_list_t *el, map_list_t const *map_list) |
|
static int | expand_lhs (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | expand_rhs (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | expand_rhs_list (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | expanded_lhs_attribute (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | expanded_lhs_value (request_t *request, unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static int | next_map (UNUSED request_t *request, UNUSED unlang_frame_state_edit_t *state, edit_map_t *current) |
|
static bool | pair_is_editable (request_t *request, fr_pair_t *vp) |
|
static unlang_action_t | process_edit (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Apply a map (recursively) to a request. More...
|
|
static int | tmpl_attr_from_result (TALLOC_CTX *ctx, map_t const *map, edit_result_t *out, request_t *request) |
|
static int | tmpl_to_values (TALLOC_CTX *ctx, edit_result_t *out, request_t *request, tmpl_t const *vpt) |
|
void | unlang_edit_init (void) |
|
int | unlang_edit_push (request_t *request, bool *success, fr_edit_list_t *el, map_list_t const *map_list) |
| Push a map onto the stack for edit evaluation. More...
|
|
static unlang_action_t | unlang_edit_state_init (rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
| Execute an update block. More...
|
|
Push a map onto the stack for edit evaluation.
If the "success" variable returns "false", the caller should call fr_edit_list_abort().
If the "success" variable returns "true", the caller can free the edit list (or rely on talloc to do that) and the transaction will be finalized.
- Parameters
-
[in] | request | The current request. |
[out] | success | Whether or not the edit succeeded |
[in] | el | Edit list which can be used to apply multiple edits |
[in] | map_list | The map list to process |
Definition at line 1682 of file edit.c.
Execute an update block.
Update blocks execute in two phases, first there's an evaluation phase where each input map is evaluated, outputting one or more modification maps. The modification maps detail a change that should be made to a list in the current request. The request is not modified during this phase.
The second phase applies those modification maps to the current request. This re-enables the atomic functionality of update blocks provided in v2.x.x. If one map fails in the evaluation phase, no more maps are processed, and the current result is discarded.
Definition at line 1654 of file edit.c.