summaryrefslogtreecommitdiff
path: root/src/providers/ldap
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-05-22 17:41:52 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-05-22 13:23:08 -0400
commitb49c47d573208f22a40214a728112949956acb57 (patch)
tree48a3cc5ae33a72453e539ea9aa43db070b1c85d5 /src/providers/ldap
parent45db68ae27147955a4be4c2c772041824c0dc00f (diff)
downloadsssd-b49c47d573208f22a40214a728112949956acb57.tar.gz
sssd-b49c47d573208f22a40214a728112949956acb57.tar.bz2
sssd-b49c47d573208f22a40214a728112949956acb57.zip
LDAP nested groups: Do not process callback with _post deep in the nested structure
https://fedorahosted.org/sssd/ticket/1343
Diffstat (limited to 'src/providers/ldap')
-rw-r--r--src/providers/ldap/sdap_async_groups.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index b48fe72e..c3cc2ac9 100644
--- a/src/providers/ldap/sdap_async_groups.c
+++ b/src/providers/ldap/sdap_async_groups.c
@@ -2493,14 +2493,13 @@ static errno_t sdap_nested_group_lookup_user(struct tevent_req *req,
ret = sdap_nested_group_process_step(req);
}
- if (ret == EOK) {
- /* EOK means it's complete */
- tevent_req_done(req);
- tevent_req_post(req, state->ev);
- } else if (ret != EAGAIN) {
+ if (ret != EOK && ret != EAGAIN) {
+ DEBUG(SSSDBG_OP_FAILURE, ("Nested group processing failed\n"));
return ret;
+ } else if (ret == EOK) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("All done.\n"));
+ tevent_req_done(req);
}
-
return EOK;
}
/*
@@ -2578,14 +2577,13 @@ static errno_t sdap_nested_group_lookup_group(struct tevent_req *req)
ret = sdap_nested_group_process_step(req);
}
- if (ret == EOK) {
- /* EOK means it's complete */
- tevent_req_done(req);
- tevent_req_post(req, state->ev);
- } else if (ret != EAGAIN) {
+ if (ret != EOK && ret != EAGAIN) {
+ DEBUG(SSSDBG_OP_FAILURE, ("Nested group processing failed\n"));
return ret;
+ } else if (ret == EOK) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("All done.\n"));
+ tevent_req_done(req);
}
-
return EOK;
}