From: Alan T. DeKok Date: Thu, 7 Apr 2022 22:08:39 +0000 (-0400) Subject: no need to set vp->op in map callback functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5fb23b9107476352b9ee95e26e8eb1cc24b15b0;p=thirdparty%2Ffreeradius-server.git no need to set vp->op in map callback functions map_to_request() ignores it, and just uses map->op --- diff --git a/src/lib/ldap/map.c b/src/lib/ldap/map.c index 4384e6a8e4..2fb818b378 100644 --- a/src/lib/ldap/map.c +++ b/src/lib/ldap/map.c @@ -168,7 +168,6 @@ int fr_ldap_map_getvalue(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *reques continue; } - vp->op = map->op; fr_pair_append(&head, vp); /* diff --git a/src/modules/rlm_client/rlm_client.c b/src/modules/rlm_client/rlm_client.c index 8266f9f47d..b195880b0f 100644 --- a/src/modules/rlm_client/rlm_client.c +++ b/src/modules/rlm_client/rlm_client.c @@ -90,7 +90,6 @@ static int _map_proc_client_get_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request goto error; } - vp->op = map->op; fr_pair_append(&head, vp); if (map->op != T_OP_ADD_EQ) break; /* Create multiple attribute for multiple CONF_PAIRs */ diff --git a/src/modules/rlm_csv/rlm_csv.c b/src/modules/rlm_csv/rlm_csv.c index adb5bb9dcf..8cf4e5dd4f 100644 --- a/src/modules/rlm_csv/rlm_csv.c +++ b/src/modules/rlm_csv/rlm_csv.c @@ -876,7 +876,6 @@ static int csv_map_getvalue(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *req return -1; } - vp->op = map->op; fr_pair_append(out, vp); return 0; diff --git a/src/modules/rlm_json/rlm_json.c b/src/modules/rlm_json/rlm_json.c index 56d1f4a58e..a0f7d9b2cb 100644 --- a/src/modules/rlm_json/rlm_json.c +++ b/src/modules/rlm_json/rlm_json.c @@ -392,7 +392,6 @@ static int _json_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_list_t *out, reques value; fr_pair_append(out, vp), value = fr_dlist_next(&head, value)) { MEM(vp = fr_pair_afrom_da(ctx, tmpl_da(map->lhs))); - vp->op = map->op; if (fr_value_box_steal(vp, &vp->data, value) < 0) { RPEDEBUG("Copying data to attribute failed"); diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index a002824efa..1cd997cd65 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -347,7 +347,6 @@ static int _sql_map_proc_get_value(TALLOC_CTX *ctx, fr_pair_list_t *out, return -1; } - vp->op = map->op; fr_pair_append(out, vp); return 0;