]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Return UNLANG_ACTION_FAIL from RETURN_UNLANG_FAIL
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 1 Jun 2025 16:44:39 +0000 (10:44 -0600)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 18 Jun 2025 12:53:11 +0000 (13:53 +0100)
src/lib/server/rcode.h
src/modules/rlm_ldap/rlm_ldap.c

index 61505faa98f12fa96413fcf8a9e49b486273c9bc..a304d50e31169a20585afcddeae525044bef6f3d 100644 (file)
@@ -54,7 +54,7 @@ typedef enum {
 } rlm_rcode_t;
 
 #define RETURN_UNLANG_REJECT           do { p_result->rcode = RLM_MODULE_REJECT; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
-#define RETURN_UNLANG_FAIL             do { p_result->rcode = RLM_MODULE_FAIL; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
+#define RETURN_UNLANG_FAIL             do { p_result->rcode = RLM_MODULE_FAIL; return UNLANG_ACTION_FAIL; } while (0)
 #define RETURN_UNLANG_OK               do { p_result->rcode = RLM_MODULE_OK; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 #define RETURN_UNLANG_HANDLED          do { p_result->rcode = RLM_MODULE_HANDLED; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
 #define RETURN_UNLANG_INVALID          do { p_result->rcode = RLM_MODULE_INVALID; return UNLANG_ACTION_CALCULATE_RESULT; } while (0)
index 7ff04a140a3432e4e2bd90ccb7acd952de7ea44f..715e55eddf709338a95bc5e2d2c63213dad21cd1 100644 (file)
@@ -976,7 +976,7 @@ static unlang_action_t ldap_group_xlat_results(unlang_result_t *p_result, reques
        switch (xlat_ctx->status) {
        case GROUP_XLAT_FIND_USER:
                if (!xlat_ctx->dn) xlat_ctx->dn = rlm_find_user_dn_cached(request);
-               if (!xlat_ctx->dn) return UNLANG_ACTION_FAIL;
+               if (!xlat_ctx->dn) RETURN_UNLANG_FAIL;
 
                if (inst->group.obj_membership_filter) {
                        REPEAT_LDAP_MEMBEROF_XLAT_RESULTS;
@@ -2135,7 +2135,7 @@ static unlang_action_t user_modify_mod_build_resume(unlang_result_t *p_result,
                                if (fr_value_box_list_concat_in_place(vb_head, vb_head, &vb->vb_group, FR_TYPE_STRING,
                                                                      FR_VALUE_BOX_LIST_FREE, true, SIZE_MAX) < 0) {
                                        RPEDEBUG("Failed concatenating update value");
-                                       return UNLANG_ACTION_FAIL;
+                                       RETURN_UNLANG_FAIL;
                                }
                                vb = vb_head;
                                goto populate_string;
@@ -2144,7 +2144,7 @@ static unlang_action_t user_modify_mod_build_resume(unlang_result_t *p_result,
                        case FR_TYPE_FIXED_SIZE:
                                if (fr_value_box_cast_in_place(vb, vb, FR_TYPE_STRING, NULL) < 0) {
                                        RPEDEBUG("Failed casting update value");
-                                       return UNLANG_ACTION_FAIL;
+                                       RETURN_UNLANG_FAIL;
                                }
                                goto populate_string;