sssd/0017-LDAP-nested-groups-Do-not-process-callback-with-_pos.patch
Stephen Gallagher 359d341a35 Fix several regressions since 1.5.x
- Ensure that the RPM creates the /var/lib/sss/mc directory
- Add support for Netscape password warning expiration control
- Rebuild against libldb 1.1.6
2012-05-24 08:23:25 -04:00

59 lines
2.1 KiB
Diff

From 04462f020ebb14c9b7a34425606f47db064f4f4a Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Tue, 22 May 2012 17:41:52 +0200
Subject: [PATCH 17/19] LDAP nested groups: Do not process callback with _post
deep in the nested structure
https://fedorahosted.org/sssd/ticket/1343
---
src/providers/ldap/sdap_async_groups.c | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/providers/ldap/sdap_async_groups.c b/src/providers/ldap/sdap_async_groups.c
index b48fe72eca1ab1dfe2dcb7a97a856ecef86d6f33..c3cc2ac92b80a52632655be03f8386ab2e68d7b9 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;
}
--
1.7.10.1