From 92123233d2681f6e15e851c681580b64aae2a043 Mon Sep 17 00:00:00 2001 From: Jan Zeleny Date: Wed, 8 Jun 2011 08:48:55 -0400 Subject: Confusing part of code cleared out --- src/providers/ldap/sdap_async_groups.c | 66 +++++++++++++++++----------------- 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'src/providers') diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c index 99b1a9e64..e7db14eb8 100644 --- a/src/providers/ldap/sdap_async_groups.c +++ b/src/providers/ldap/sdap_async_groups.c @@ -1233,46 +1233,44 @@ static void sdap_get_groups_process(struct tevent_req *subreq) case 1: /* Single group search */ - if ((state->opts->schema_type == SDAP_SCHEMA_RFC2307) || - (dp_opt_get_int(state->opts->basic, SDAP_NESTING_LEVEL) == 0)) { - /* Either this is RFC2307 or we have disabled nested group - * support for RFC2307bis. Either way, we'll process the - * groups in single-level, multiple-request mode. - */ - break; - } + if ((state->opts->schema_type != SDAP_SCHEMA_RFC2307) && + (dp_opt_get_int(state->opts->basic, SDAP_NESTING_LEVEL) != 0)) { - /* Prepare hashes for nested user processing */ - ret = sss_hash_create(state, 32, &state->user_hash); - if (ret != EOK) { - tevent_req_error(req, ret); - return; - } + /* Prepare hashes for nested user processing */ + ret = sss_hash_create(state, 32, &state->user_hash); + if (ret != EOK) { + tevent_req_error(req, ret); + return; + } - ret = sss_hash_create(state, 32, &state->group_hash); - if (ret != EOK) { - tevent_req_error(req, ret); - return; - } + ret = sss_hash_create(state, 32, &state->group_hash); + if (ret != EOK) { + tevent_req_error(req, ret); + return; + } - subreq = sdap_nested_group_process_send(state, - state->ev, - state->dom, - state->sysdb, - state->groups[0], - state->user_hash, - state->group_hash, - state->opts, - state->sh, - 0); - if (!subreq) { - tevent_req_error(req, EIO); + subreq = sdap_nested_group_process_send(state, + state->ev, + state->dom, + state->sysdb, + state->groups[0], + state->user_hash, + state->group_hash, + state->opts, + state->sh, + 0); + if (!subreq) { + tevent_req_error(req, EIO); + return; + } + + tevent_req_set_callback(subreq, sdap_nested_done, req); return; + } else { + /* RFC2307 or disabled nested groups */ + break; } - tevent_req_set_callback(subreq, sdap_nested_done, req); - return; - default: /* Enumeration */ enumeration = true; -- cgit