|
|
72e12a |
From bb94a18f0f0cba1e9fb5abf78b995d69e5f3c559 Mon Sep 17 00:00:00 2001
|
|
|
72e12a |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
72e12a |
Date: Mon, 18 Oct 2021 12:29:06 +0200
|
|
|
72e12a |
Subject: [PATCH] cache_req: return success for autofs when ENOENT is returned
|
|
|
72e12a |
from provider
|
|
|
72e12a |
|
|
|
72e12a |
The receive function should return true if data provider lookup was
|
|
|
72e12a |
successfull and false if there was an error. "Not found" result is
|
|
|
72e12a |
considered a successful lookup, only failure to perform a search
|
|
|
72e12a |
should result in false return code.
|
|
|
72e12a |
|
|
|
72e12a |
Resolves: https://github.com/SSSD/sssd/issues/5832
|
|
|
72e12a |
|
|
|
72e12a |
Reviewed-by: Pawel Polawski <ppolawsk@redhat.com>
|
|
|
72e12a |
---
|
|
|
72e12a |
.../common/cache_req/plugins/cache_req_autofs_entry_by_name.c | 2 +-
|
|
|
72e12a |
.../common/cache_req/plugins/cache_req_autofs_map_by_name.c | 2 +-
|
|
|
72e12a |
.../common/cache_req/plugins/cache_req_autofs_map_entries.c | 2 +-
|
|
|
72e12a |
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
72e12a |
|
|
|
72e12a |
diff --git a/src/responder/common/cache_req/plugins/cache_req_autofs_entry_by_name.c b/src/responder/common/cache_req/plugins/cache_req_autofs_entry_by_name.c
|
|
|
72e12a |
index 0dc6a585a..788b6708c 100644
|
|
|
72e12a |
--- a/src/responder/common/cache_req/plugins/cache_req_autofs_entry_by_name.c
|
|
|
72e12a |
+++ b/src/responder/common/cache_req/plugins/cache_req_autofs_entry_by_name.c
|
|
|
72e12a |
@@ -97,7 +97,7 @@ cache_req_autofs_entry_by_name_dp_recv(struct tevent_req *subreq,
|
|
|
72e12a |
|
|
|
72e12a |
ret = sbus_call_dp_autofs_GetEntry_recv(subreq);
|
|
|
72e12a |
|
|
|
72e12a |
- if (ret == ERR_MISSING_DP_TARGET) {
|
|
|
72e12a |
+ if (ret == ERR_MISSING_DP_TARGET || ret == ENOENT) {
|
|
|
72e12a |
ret = EOK;
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
diff --git a/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c b/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
|
|
|
72e12a |
index 6a665c58e..5d82641cc 100644
|
|
|
72e12a |
--- a/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
|
|
|
72e12a |
+++ b/src/responder/common/cache_req/plugins/cache_req_autofs_map_by_name.c
|
|
|
72e12a |
@@ -93,7 +93,7 @@ cache_req_autofs_map_by_name_dp_recv(struct tevent_req *subreq,
|
|
|
72e12a |
|
|
|
72e12a |
ret = sbus_call_dp_autofs_GetMap_recv(subreq);
|
|
|
72e12a |
|
|
|
72e12a |
- if (ret == ERR_MISSING_DP_TARGET) {
|
|
|
72e12a |
+ if (ret == ERR_MISSING_DP_TARGET || ret == ENOENT) {
|
|
|
72e12a |
ret = EOK;
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
diff --git a/src/responder/common/cache_req/plugins/cache_req_autofs_map_entries.c b/src/responder/common/cache_req/plugins/cache_req_autofs_map_entries.c
|
|
|
72e12a |
index 46776b980..29f289723 100644
|
|
|
72e12a |
--- a/src/responder/common/cache_req/plugins/cache_req_autofs_map_entries.c
|
|
|
72e12a |
+++ b/src/responder/common/cache_req/plugins/cache_req_autofs_map_entries.c
|
|
|
72e12a |
@@ -125,7 +125,7 @@ cache_req_autofs_map_entries_dp_recv(struct tevent_req *subreq,
|
|
|
72e12a |
|
|
|
72e12a |
ret = sbus_call_dp_autofs_Enumerate_recv(subreq);
|
|
|
72e12a |
|
|
|
72e12a |
- if (ret == ERR_MISSING_DP_TARGET) {
|
|
|
72e12a |
+ if (ret == ERR_MISSING_DP_TARGET || ret == ENOENT) {
|
|
|
72e12a |
ret = EOK;
|
|
|
72e12a |
}
|
|
|
72e12a |
|
|
|
72e12a |
--
|
|
|
72e12a |
2.26.3
|
|
|
72e12a |
|