]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no need to set vp->op in map callback functions
authorAlan T. DeKok <aland@freeradius.org>
Thu, 7 Apr 2022 22:08:39 +0000 (18:08 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 7 Apr 2022 22:08:39 +0000 (18:08 -0400)
map_to_request() ignores it, and just uses map->op

src/lib/ldap/map.c
src/modules/rlm_client/rlm_client.c
src/modules/rlm_csv/rlm_csv.c
src/modules/rlm_json/rlm_json.c
src/modules/rlm_sql/rlm_sql.c

index 4384e6a8e4ac29ecfe3910e5afb398d520bea8fa..2fb818b3784ec96ea43d8dc8386387f0ca11a222 100644 (file)
@@ -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);
 
                        /*
index 8266f9f47dee02a6e847698af7954004f9c31e56..b195880b0f239fad72adf317e3b8f7f2eb16ceee 100644 (file)
@@ -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 */
index adb5bb9dcf23c8c08bb98113dbc8784a91e2d674..8cf4e5dd4f8e9a021af71977418d8cecb2aa928e 100644 (file)
@@ -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;
index 56d1f4a58eb53f8a366157a3d2ac2ad991444621..a0f7d9b2cb8cfa8bd9be6284613dd5451c93b0d5 100644 (file)
@@ -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");
index a002824efa81ac45b93639bc9e48036e4c10d739..1cd997cd6506070bf0f56bc6f0702192685ac5f6 100644 (file)
@@ -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;