[SSSD] [PATCH] Fix moving to next entry in deref code

Jakub Hrozek jhrozek at redhat.com
Sun Aug 21 15:54:25 UTC 2011


https://fedorahosted.org/sssd/ticket/973

I'm pretty sure this patch will fix the problem John Hodrien had with
dereference code, although I have not reproduced the problem using
referrals as he did, but simpler:

i) use the dereference code, but process a group that is below the full
deref threshold (<10 members by default)
ii) one of its members is neither user nor group and is not cached
iii) the dereference code always tries to move the "expired group index"
not the "missing DN index" so the missing DN array never reaches the
NULL sentinel
-------------- next part --------------
>From c940722d2c835f6e7e62b68d9807486c2ac83a5e Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Fri, 19 Aug 2011 19:57:51 +0200
Subject: [PATCH] Fix moving to next entry in deref code

https://fedorahosted.org/sssd/ticket/973
---
 src/providers/ldap/sdap_async_groups.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index 426b6f2..f887651 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -2492,7 +2492,12 @@ static void sdap_nested_group_process_group(struct tevent_req *subreq)
 
 skip:
     if (state->derefctx) {
-        state->derefctx->expired_groups_index++;
+        if (state->derefctx->expired_groups_index <
+            state->derefctx->expired_groups_num) {
+            state->derefctx->expired_groups_index++;
+        } else {
+            state->derefctx->missing_dns_index++;
+        }
         ret = sdap_nested_group_process_noderef(req);
     } else {
         state->member_index++;
-- 
1.7.6



More information about the sssd-devel mailing list