summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2013-12-05 13:26:39 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-12-09 22:12:24 +0100
commit5b94e341a6ae347f49cfd18d574c9f37d0c2633e (patch)
tree66cf8ff4d96b7b1f92d0464dd84ece17ceb07839 /src
parent5ef18e4f486cf3637688ff5fd659bf8a789ec73f (diff)
downloadsssd-5b94e341a6ae347f49cfd18d574c9f37d0c2633e.tar.gz
sssd-5b94e341a6ae347f49cfd18d574c9f37d0c2633e.tar.xz
sssd-5b94e341a6ae347f49cfd18d574c9f37d0c2633e.zip
rfc2307bis_nested_groups_send: reuse search base
If there are multiple members in the sdom list, always the search base of the first entry were used.
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_async_initgroups.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/providers/ldap/sdap_async_initgroups.c b/src/providers/ldap/sdap_async_initgroups.c
index 91a3a82de..10d29e0cd 100644
--- a/src/providers/ldap/sdap_async_initgroups.c
+++ b/src/providers/ldap/sdap_async_initgroups.c
@@ -1472,6 +1472,7 @@ struct tevent_req *rfc2307bis_nested_groups_send(
TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct sdap_options *opts, struct sysdb_ctx *sysdb,
struct sss_domain_info *dom, struct sdap_handle *sh,
+ struct sdap_search_base **search_bases,
struct sysdb_attrs **groups, size_t num_groups,
hash_table_t *group_hash, size_t nesting);
static errno_t rfc2307bis_nested_groups_recv(struct tevent_req *req);
@@ -1699,7 +1700,9 @@ static void sdap_initgr_rfc2307bis_process(struct tevent_req *subreq)
subreq = rfc2307bis_nested_groups_send(state, state->ev, state->opts,
state->sysdb, state->dom,
- state->sh, state->direct_groups,
+ state->sh,
+ state->search_bases,
+ state->direct_groups,
state->num_direct_parents,
state->group_hash, 0);
if (!subreq) {
@@ -2143,6 +2146,7 @@ struct tevent_req *rfc2307bis_nested_groups_send(
TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct sdap_options *opts, struct sysdb_ctx *sysdb,
struct sss_domain_info *dom, struct sdap_handle *sh,
+ struct sdap_search_base **search_bases,
struct sysdb_attrs **groups, size_t num_groups,
hash_table_t *group_hash, size_t nesting)
{
@@ -2179,7 +2183,7 @@ struct tevent_req *rfc2307bis_nested_groups_send(
state->timeout = dp_opt_get_int(state->opts->basic,
SDAP_SEARCH_TIMEOUT);
state->base_iter = 0;
- state->search_bases = opts->sdom->group_search_bases;
+ state->search_bases = search_bases;
if (!state->search_bases) {
DEBUG(SSSDBG_CRIT_FAILURE,
("Initgroups nested lookup request "
@@ -2503,6 +2507,7 @@ static void rfc2307bis_nested_groups_process(struct tevent_req *subreq)
subreq = rfc2307bis_nested_groups_send(
state, state->ev, state->opts, state->sysdb,
state->dom, state->sh,
+ state->search_bases,
ngr->ldap_parents,
ngr->parents_count,
state->group_hash,