]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
< 30 instances of "???" vs > 200 instances of "<INVALID>"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Feb 2023 20:56:36 +0000 (14:56 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Feb 2023 20:56:36 +0000 (14:56 -0600)
src/lib/server/process.h
src/lib/unlang/compile.c
src/lib/unlang/interpret.c
src/lib/util/machine.c
src/lib/util/token.c
src/modules/rlm_sql/sql.c
src/process/radius/base.c
src/process/tacacs/base.c
src/process/ttls/base.c
src/protocols/dns/decode.c

index a471a316dc402965d38b5b3fa3c39fed57abe805..92645f1e4ec140ab45e6219e984d4e436cba8ed6 100644 (file)
@@ -356,7 +356,7 @@ RESUME(send_generic)
                if (cs) {
                        RDEBUG("The 'send %s' section returned %s - not sending a response",
                               cf_section_name2(cs),
-                              fr_table_str_by_value(rcode_table, rcode, "???"));
+                              fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
                }
                request->reply->code = PROCESS_CODE_DO_NOT_RESPOND;
                break;
index a82e34be1d2ea914a13c52e98b2de20c5e5a137a..04c1bc4e3cc7b01ec9b30a20f774d7ec5719812d 100644 (file)
@@ -1364,7 +1364,7 @@ static unlang_t *compile_update_to_edit(unlang_t *parent, unlang_compile_t *unla
        if (name2) {
                snprintf(list_buffer, sizeof(list_buffer), "&%s", name2);
        } else {
-               snprintf(list_buffer, sizeof(list_buffer), "&%s", fr_table_str_by_value(pair_list_table, unlang_ctx->rules->attr.list_def, "???"));
+               snprintf(list_buffer, sizeof(list_buffer), "&%s", fr_table_str_by_value(pair_list_table, unlang_ctx->rules->attr.list_def, "<INVALID>"));
        }
 
        /*
@@ -2318,7 +2318,7 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs,
 
                        subci = cf_reference_item(cs, cf_root(cf_section_to_item(action_cs)), value);
                        if (!subci) {
-                               cf_log_err(csi, "Unknown reference '%s'", value ? value : "???");
+                               cf_log_err(csi, "Unknown reference '%s'", value ? value : "<INVALID>");
                                return false;
                        }
 
@@ -2356,13 +2356,13 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs,
 
                if (module_retry) {
                        cf_log_err(csi, "Cannot use a '%s = retry' action for a module which has its own retries",
-                                  fr_table_str_by_value(mod_rcode_table, i, "???"));
+                                  fr_table_str_by_value(mod_rcode_table, i, "<INVALID>"));
                        return false;
                }
 
                if (disallow_retry_action) {
                        cf_log_err(csi, "max_rtx_count and max_rtx_duration cannot both be zero when using '%s = retry'",
-                                  fr_table_str_by_value(mod_rcode_table, i, "???"));
+                                  fr_table_str_by_value(mod_rcode_table, i, "<INVALID>"));
                        return false;
                }
 
@@ -2370,7 +2370,7 @@ bool unlang_compile_actions(unlang_actions_t *actions, CONF_SECTION *action_cs,
                    !actions->retry.mrc &&
                    !fr_time_delta_ispos(actions->retry.mrd)) {
                        cf_log_err(csi, "Cannot use a '%s = retry' action without a 'retry { ... }' section.",
-                                  fr_table_str_by_value(mod_rcode_table, i, "???"));
+                                  fr_table_str_by_value(mod_rcode_table, i, "<INVALID>"));
                        return false;
                }
        }
index 02df98f314245d252631212d36318963ebc50cb9..96d2a6e969d78eb39bb5af7b70646e2d722ad3a1 100644 (file)
@@ -1367,7 +1367,7 @@ static xlat_action_t unlang_interpret_xlat(TALLOC_CTX *ctx, fr_dcursor_t *out,
         *      All of the remaining things need a CONF_ITEM.
         */
        if (!instruction->ci) {
-               if (fr_value_box_bstrndup(ctx, vb, NULL, "???", 3, false) < 0) goto error;
+               if (fr_value_box_bstrndup(ctx, vb, NULL, "<INVALID>", 3, false) < 0) goto error;
                        goto finish;
        }
 
index e939d752825f97c95da21961d9e3a43dbf2aaefd..7b34edde5b12d1e9d3deb454499afd6c655f6a87 100644 (file)
@@ -484,14 +484,14 @@ char const *fr_machine_state_name(fr_machine_t *m, int state)
 {
        fr_assert(!m->dead);
 
-       if ((state < 0) || (state > m->def->max_state)) return "???";
+       if ((state < 0) || (state > m->def->max_state)) return "<INVALID>";
 
        if (!state) {
                if (m->current) {
                        state = m->current->def->number;
 
                } else {
-                       return "???";
+                       return "<INVALID>";
                }
        }
 
index fe8cfa3fce3ca4b95983c987168d28d7e62e490c..ab85b4724a894e853d432fc29ad863c31fa9ebe8 100644 (file)
@@ -487,7 +487,7 @@ fr_token_t getstring(char const **ptr, char *buf, int buflen, bool unescape)
 
 char const *fr_token_name(int token)
 {
-       return fr_table_str_by_value(fr_tokens_table, token, "???");
+       return fr_table_str_by_value(fr_tokens_table, token, "<INVALID>");
 }
 
 
index eabfc650bba22f8c2c12a1cccf703593190c9ea7..c9029e852dd71ad641b3972bf8e4ef03c1dc6e0e 100644 (file)
@@ -158,7 +158,7 @@ static int sql_pair_afrom_row(TALLOC_CTX *ctx, request_t *request, fr_pair_list_
                return -1;
        }
 
-       RDEBUG3("Found row: %s %s %s", row[0], fr_table_str_by_value(fr_tokens_table, op, "???"), row[3]);
+       RDEBUG3("Found row: %s %s %s", row[0], fr_table_str_by_value(fr_tokens_table, op, "<INVALID>"), row[3]);
 
        value = row[3];
 
index 3b2b7648132636e8472541e043b3e0a1bf9b1386..16a7c369655a0151ff0a0204d06ebae13db9c66b 100644 (file)
@@ -401,7 +401,7 @@ RESUME(access_request)
         */
        if (request->reply->code == FR_RADIUS_CODE_ACCESS_REJECT) {
                RDEBUG("The 'recv Access-Request' section returned %s - rejecting the request",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        send_reply:
                UPDATE_STATE(reply);
@@ -412,7 +412,7 @@ RESUME(access_request)
 
        if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) {
                RDEBUG("The 'recv Access-Request' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
                goto send_reply;
        }
 
@@ -440,7 +440,7 @@ RESUME(access_request)
        vp = fr_pair_find_by_da(&request->control_pairs, NULL, attr_auth_type);
        if (!vp) {
                RDEBUG("No 'Auth-Type' attribute found, cannot authenticate the user - rejecting the request",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        reject:
                request->reply->code = FR_RADIUS_CODE_ACCESS_REJECT;
@@ -450,7 +450,7 @@ RESUME(access_request)
        dv = fr_dict_enum_by_value(vp->da, &vp->data);
        if (!dv) {
                RDEBUG("Invalid value for 'Auth-Type' attribute, cannot authenticate the user - rejecting the request",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                goto reject;
        }
@@ -515,7 +515,7 @@ RESUME(auth_type)
                UPDATE_STATE(reply);
 
                RDEBUG("The 'authenticate' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                fr_assert(state->send != NULL);
                return state->send(p_result, mctx, request);
@@ -685,7 +685,7 @@ RESUME(acct_type)
                UPDATE_STATE(reply);
 
                RDEBUG("The 'accounting' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                fr_assert(state->send != NULL);
                return state->send(p_result, mctx, request);
@@ -719,7 +719,7 @@ RESUME(accounting_request)
 
        if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) {
                RDEBUG("The 'recv Accounting-Request' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        send_reply:
                fr_assert(state->send != NULL);
index ebc570e5a114669f8a27422e183b69053b60a15c..8b7c19fa0d19f95af479f816165f97b6096c3a76 100644 (file)
@@ -440,7 +440,7 @@ RESUME(auth_start)
         */
        if (request->reply->code == FR_TACACS_CODE_AUTH_REPLY_FAIL) {
                RDEBUG("The 'recv Authentication-Start' section returned %s - rejecting the request",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        send_reply:
                UPDATE_STATE(reply);
@@ -476,7 +476,7 @@ RESUME(auth_start)
        if (!vp) vp = fr_pair_find_by_da(&request->request_pairs, NULL, attr_tacacs_authentication_type);
        if (!vp) {
                RDEBUG("No 'Auth-Type' attribute found, cannot authenticate the user - rejecting the request",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        reject:
                request->reply->code = FR_TACACS_CODE_AUTH_REPLY_FAIL;
@@ -486,7 +486,7 @@ RESUME(auth_start)
        dv = fr_dict_enum_by_value(vp->da, &vp->data);
        if (!dv) {
                RDEBUG("Invalid value for '%s' attribute, cannot authenticate the user - rejecting the request",
-                      vp->da->name, fr_table_str_by_value(rcode_table, rcode, "???"));
+                      vp->da->name, fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                goto reject;
        }
@@ -719,7 +719,7 @@ RESUME(acct_type)
                UPDATE_STATE(reply);
 
                RDEBUG("The 'accounting' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                fr_assert(state->send != NULL);
                return state->send(p_result, mctx, request);
index 20cc9688e71dcdb6f96afb354b67ef6b2976d2fc..cf823ee3883ff20e320e72977e846b582432fbc6 100644 (file)
@@ -379,7 +379,7 @@ RESUME(access_request)
 
        if (request->reply->code == FR_RADIUS_CODE_DO_NOT_RESPOND) {
                RDEBUG("The 'recv Access-Request' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
        send_reply:
                fr_assert(state->send != NULL);
@@ -452,7 +452,7 @@ RESUME(auth_type)
                UPDATE_STATE(reply);
 
                RDEBUG("The 'authenticate' section returned %s - not sending a response",
-                      fr_table_str_by_value(rcode_table, rcode, "???"));
+                      fr_table_str_by_value(rcode_table, rcode, "<INVALID>"));
 
                fr_assert(state->send != NULL);
                return state->send(p_result, mctx, request);
index 53389a8cc5ca61c968a22f16b7fc054e8dd9bfbd..b33b93a63404f605a6b6d7039d2aab5bbd2272d6 100644 (file)
@@ -436,7 +436,7 @@ static ssize_t decode_proto(TALLOC_CTX *ctx, fr_pair_list_t *out, uint8_t const
                if (!fr_dns_packet_ok(data, data_len, false, &reason)) {
                fail:
                        fr_strerror_printf("DNS packet malformed - %s",
-                                          fr_table_str_by_value(reason_fail_table, reason, "???"));
+                                          fr_table_str_by_value(reason_fail_table, reason, "<INVALID>"));
                        return -1;
                }
        }