From: Nick Porter Date: Fri, 28 Apr 2023 10:48:11 +0000 (+0100) Subject: Rework rlm_ldap_check_cached to use a fr_value_box_t X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6b319935514c9d92fc2d865a7b6d792f2008fec;p=thirdparty%2Ffreeradius-server.git Rework rlm_ldap_check_cached to use a fr_value_box_t --- diff --git a/src/modules/rlm_ldap/groups.c b/src/modules/rlm_ldap/groups.c index 6e52b18276f..d22395146b3 100644 --- a/src/modules/rlm_ldap/groups.c +++ b/src/modules/rlm_ldap/groups.c @@ -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; diff --git a/src/modules/rlm_ldap/rlm_ldap.h b/src/modules/rlm_ldap/rlm_ldap.h index 14397719269..9b520c8ea78 100644 --- a/src/modules/rlm_ldap/rlm_ldap.h +++ b/src/modules/rlm_ldap/rlm_ldap.h @@ -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);