- https://fedorahosted.org/sssd/ticket/{id} - Regressions: #2471, #2475, #2483, #2487, #2529, #2535 - Bugs: #2287, #2445
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From 38b81775a27ce2f8a97aaaa18952263d83ad60f9 Mon Sep 17 00:00:00 2001
|
|
From: Jakub Hrozek <jhrozek@redhat.com>
|
|
Date: Wed, 29 Oct 2014 20:30:20 +0100
|
|
Subject: [PATCH 07/26] IPA: Don't fail the request when BE doesn't find the
|
|
object
|
|
|
|
The IPA subdomain code treated ENOENT as a fatal error, which resulted
|
|
in a loud error message and the whole request being aborted. This patch
|
|
ignores ENOENT.
|
|
|
|
Reviewed-by: Pavel Reichl <preichl@redhat.com>
|
|
---
|
|
src/providers/ipa/ipa_subdomains_id.c | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
|
|
index b67006ce6e0b4bf9c794016c1dfc923ac6da3624..0a1c4c17eed37b2eb12a8c758e49fc17c3b642b5 100644
|
|
--- a/src/providers/ipa/ipa_subdomains_id.c
|
|
+++ b/src/providers/ipa/ipa_subdomains_id.c
|
|
@@ -942,7 +942,7 @@ static errno_t get_object_from_cache(TALLOC_CTX *mem_ctx,
|
|
goto done;
|
|
}
|
|
|
|
- if (ret != EOK) {
|
|
+ if (ret != EOK && ret != ENOENT) {
|
|
DEBUG(SSSDBG_OP_FAILURE,
|
|
"Failed to make request to our cache: [%d]: [%s]\n",
|
|
ret, sss_strerror(ret));
|
|
@@ -951,8 +951,6 @@ static errno_t get_object_from_cache(TALLOC_CTX *mem_ctx,
|
|
|
|
*_msg = msg;
|
|
|
|
- ret = EOK;
|
|
-
|
|
done:
|
|
return ret;
|
|
}
|
|
@@ -978,7 +976,11 @@ ipa_get_ad_acct_ad_part_done(struct tevent_req *subreq)
|
|
|
|
ret = get_object_from_cache(state, state->user_dom, state->ar,
|
|
&state->obj_msg);
|
|
- if (ret != EOK) {
|
|
+ if (ret == ENOENT) {
|
|
+ DEBUG(SSSDBG_MINOR_FAILURE, "Object not found, ending request\n");
|
|
+ tevent_req_done(req);
|
|
+ return;
|
|
+ } else if (ret != EOK) {
|
|
DEBUG(SSSDBG_OP_FAILURE, "get_object_from_cache failed.\n");
|
|
goto fail;
|
|
}
|
|
--
|
|
2.1.0
|
|
|