diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-17 00:09:48 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2012-08-21 12:05:22 +0200 |
commit | 9356e8f50436724e985d9a8f5d4f2bc0f5b837bc (patch) | |
tree | 04fd7fc855a976d5c2322f322dcebe1addb4ea21 /src/providers | |
parent | 56ad566af1e595dacfcc5a213d906e8070bb263c (diff) | |
download | sssd-9356e8f50436724e985d9a8f5d4f2bc0f5b837bc.tar.gz sssd-9356e8f50436724e985d9a8f5d4f2bc0f5b837bc.tar.bz2 sssd-9356e8f50436724e985d9a8f5d4f2bc0f5b837bc.zip |
Process all groups from a single nesting level
https://bugzilla.redhat.com/show_bug.cgi?id=846664
If the first group was cached when processing the nested group membership,
we would call tevent_req_done, effectivelly marking the whole nesting
level as done.
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/sdap_async_initgroups.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c index 2cda9c2e..be4384e2 100644 --- a/src/providers/ldap/sdap_async_initgroups.c +++ b/src/providers/ldap/sdap_async_initgroups.c @@ -2080,9 +2080,8 @@ struct tevent_req *rfc2307bis_nested_groups_send( if ((num_groups == 0) || (nesting > dp_opt_get_int(opts->basic, SDAP_NESTING_LEVEL))) { /* No parent groups to process or too deep*/ - tevent_req_done(req); - tevent_req_post(req, ev); - return req; + ret = EOK; + goto done; } state->ev = ev; @@ -2116,7 +2115,18 @@ struct tevent_req *rfc2307bis_nested_groups_send( goto done; } - ret = rfc2307bis_nested_groups_step(req); + while (state->group_iter < state->num_groups) { + ret = rfc2307bis_nested_groups_step(req); + if (ret == EOK) { + /* This group had already been looked up. Continue to + * another group in the same level + */ + state->group_iter++; + continue; + } else { + goto done; + } + } done: if (ret == EOK) { |