]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make cached group checks work when the user is the member of a single group
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 6 Nov 2014 16:24:15 +0000 (11:24 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 6 Nov 2014 16:24:32 +0000 (11:24 -0500)
src/modules/rlm_ldap/groups.c

index fdce1bfae548c7eaa807723ab8f94d053193d28d..4cc086be17ee69dafa85179b9d54e6e8a5494426 100644 (file)
@@ -719,6 +719,7 @@ rlm_rcode_t rlm_ldap_check_cached(ldap_instance_t const *inst, REQUEST *request,
        fr_cursor_init(&cursor, &request->config_items);
        vp = fr_cursor_next_by_num(&cursor, inst->cache_da->attr, inst->cache_da->vendor, TAG_ANY);
        if (!vp) return RLM_MODULE_INVALID;
+       fr_cursor_first(&cursor);
 
        while ((vp = fr_cursor_next_by_num(&cursor, inst->cache_da->attr, inst->cache_da->vendor, TAG_ANY))) {
                ret = paircmp_op(T_OP_CMP_EQ, vp, check);