]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Rework rlm_ldap_check_cached to use a fr_value_box_t
authorNick Porter <nick@portercomputing.co.uk>
Fri, 28 Apr 2023 10:48:11 +0000 (11:48 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 19 May 2023 19:35:55 +0000 (15:35 -0400)
src/modules/rlm_ldap/groups.c
src/modules/rlm_ldap/rlm_ldap.h

index 6e52b18276f56592e6bef79ad2efb71319b10585..d22395146b30a1d421d1d17b1526a0d3418130d3 100644 (file)
@@ -1081,10 +1081,10 @@ finish:
  * @param[out] p_result                Result of calling the module.
  * @param[in] inst             rlm_ldap configuration.
  * @param[in] request          Current request.
- * @param[in] check            vp containing the group value (name or dn).
+ * @param[in] check            vb containing the group value (name or dn).
  */
 unlang_action_t rlm_ldap_check_cached(rlm_rcode_t *p_result,
-                                     rlm_ldap_t const *inst, request_t *request, fr_pair_t const *check)
+                                     rlm_ldap_t const *inst, request_t *request, fr_value_box_t const *check)
 {
        fr_pair_t       *vp;
        int             ret;
@@ -1100,7 +1100,7 @@ unlang_action_t rlm_ldap_check_cached(rlm_rcode_t *p_result,
        for (vp = fr_dcursor_current(&cursor);
             vp;
             vp = fr_dcursor_next(&cursor)) {
-               ret = fr_pair_cmp_op(T_OP_CMP_EQ, vp, check);
+               ret = fr_value_box_cmp_op(T_OP_CMP_EQ, &vp->data, check);
                if (ret == 1) {
                        RDEBUG2("User found. Matched cached membership");
                        RETURN_MODULE_OK;
index 14397719269a427e732fc43f179c953613aa678e..9b520c8ea788fb48b21c49f08cd21f6f4236d29b 100644 (file)
@@ -224,4 +224,4 @@ unlang_action_t rlm_ldap_check_userobj_dynamic(rlm_rcode_t *p_result,
                                               char const *dn, fr_pair_t const *check);
 
 unlang_action_t rlm_ldap_check_cached(rlm_rcode_t *p_result,
-                                     rlm_ldap_t const *inst, request_t *request, fr_pair_t const *check);
+                                     rlm_ldap_t const *inst, request_t *request, fr_value_box_t const *check);