summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2011-06-08 08:48:55 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-08-15 09:16:39 -0400
commit92123233d2681f6e15e851c681580b64aae2a043 (patch)
tree3e00b05f4bf06e212ae4ee029eed3039d7b856e2 /src
parentf26c954658dfd7461f290f0b5d924951a6db219a (diff)
downloadsssd-92123233d2681f6e15e851c681580b64aae2a043.tar.gz
sssd-92123233d2681f6e15e851c681580b64aae2a043.tar.xz
sssd-92123233d2681f6e15e851c681580b64aae2a043.zip
Confusing part of code cleared out
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/sdap_async_groups.c66
1 files changed, 32 insertions, 34 deletions
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;