summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-01-20 17:46:35 +0100
committerStephen Gallagher <sgallagh@redhat.com>2011-01-21 16:34:54 -0500
commitc3a2e4aae7198a5ec2ac8ff028d2379668dc8aa1 (patch)
tree874e75262a36faec2c202fd52f1a6a33a042d5b1
parent911c75f1555742d78568635f1bc0549116eabd4a (diff)
downloadsssd-c3a2e4aae7198a5ec2ac8ff028d2379668dc8aa1.tar.gz
sssd-c3a2e4aae7198a5ec2ac8ff028d2379668dc8aa1.tar.xz
sssd-c3a2e4aae7198a5ec2ac8ff028d2379668dc8aa1.zip
Fix nested group handling during enumeration
Nested groups where not unrolled completely during the first enumeration run because not all where present in the cache.
-rw-r--r--src/providers/ldap/sdap_async_accounts.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/providers/ldap/sdap_async_accounts.c b/src/providers/ldap/sdap_async_accounts.c
index 6e449dbb1..7abe3571d 100644
--- a/src/providers/ldap/sdap_async_accounts.c
+++ b/src/providers/ldap/sdap_async_accounts.c
@@ -1635,6 +1635,20 @@ static void sdap_get_groups_process(struct tevent_req *subreq)
return;
}
+ if (enumeration && (state->opts->schema_type != SDAP_SCHEMA_RFC2307) &&
+ (dp_opt_get_int(state->opts->basic, SDAP_NESTING_LEVEL) != 0)) {
+
+ DEBUG(9, ("Saving groups without members first "
+ "to allow unrolling of nested groups.\n"));
+ ret = sdap_save_groups(state, state->sysdb, state->dom, state->opts,
+ state->groups, state->count, false, NULL);
+ if (ret) {
+ DEBUG(2, ("Failed to store groups.\n"));
+ tevent_req_error(req, ret);
+ return;
+ }
+ }
+
for (i = 0; i < state->count; i++) {
subreq = sdap_process_group_send(state, state->ev, state->dom,
state->sysdb, state->opts,