summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-10-29 20:30:20 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-10-30 17:21:42 +0100
commit0636276cbc6e53022b84bf1a7e4d82dee62160a9 (patch)
tree9855e4f00b2793667dd74b737dd2e2a52f52b6bb /src
parent7b5a077bd162cb2340d5d4e9f5dcc0dd00709f1a (diff)
downloadsssd-0636276cbc6e53022b84bf1a7e4d82dee62160a9.tar.gz
sssd-0636276cbc6e53022b84bf1a7e4d82dee62160a9.tar.xz
sssd-0636276cbc6e53022b84bf1a7e4d82dee62160a9.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/providers/ipa/ipa_subdomains_id.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index b67006ce6..0a1c4c17e 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;
}