summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/providers/ldap/sdap_async_enum.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_async_enum.c b/src/providers/ldap/sdap_async_enum.c
index cbee59ee5..c23a13285 100644
--- a/src/providers/ldap/sdap_async_enum.c
+++ b/src/providers/ldap/sdap_async_enum.c
@@ -236,7 +236,7 @@ static void sdap_dom_enum_ex_posix_check_done(struct tevent_req *subreq)
ret = sdap_posix_check_recv(subreq, &has_posix);
talloc_zfree(subreq);
- if (ret != EOK) {
+ if (ret != EOK && ret != ERR_NO_POSIX) {
/* We can only finish the id_op on error as the connection
* is re-used by the user search
*/
@@ -249,6 +249,16 @@ static void sdap_dom_enum_ex_posix_check_done(struct tevent_req *subreq)
tevent_req_error(req, ret);
}
return;
+ } else if (dp_error == DP_ERR_OFFLINE) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("Backend is offline, retrying later\n"));
+ tevent_req_done(req);
+ return;
+ } else {
+ /* Non-recoverable error */
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("POSIX check failed: %d: %s\n", ret, sss_strerror(ret)));
+ tevent_req_error(req, ret);
+ return;
}
}
@@ -307,6 +317,16 @@ static void sdap_dom_enum_ex_users_done(struct tevent_req *subreq)
return;
}
return;
+ } else if (dp_error == DP_ERR_OFFLINE) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("Backend is offline, retrying later\n"));
+ tevent_req_done(req);
+ return;
+ } else if (ret != EOK && ret != ENOENT) {
+ /* Non-recoverable error */
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("User enumeration failed: %d: %s\n", ret, sss_strerror(ret)));
+ tevent_req_error(req, ret);
+ return;
}
state->group_op = sdap_id_op_create(state, state->group_conn->conn_cache);
@@ -368,6 +388,16 @@ static void sdap_dom_enum_ex_groups_done(struct tevent_req *subreq)
return;
}
return;
+ } else if (dp_error == DP_ERR_OFFLINE) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("Backend is offline, retrying later\n"));
+ tevent_req_done(req);
+ return;
+ } else if (ret != EOK && ret != ENOENT) {
+ /* Non-recoverable error */
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Group enumeration failed: %d: %s\n", ret, sss_strerror(ret)));
+ tevent_req_error(req, ret);
+ return;
}
@@ -427,6 +457,16 @@ static void sdap_dom_enum_ex_svcs_done(struct tevent_req *subreq)
return;
}
return;
+ } else if (dp_error == DP_ERR_OFFLINE) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("Backend is offline, retrying later\n"));
+ tevent_req_done(req);
+ return;
+ } else if (ret != EOK && ret != ENOENT) {
+ /* Non-recoverable error */
+ DEBUG(SSSDBG_OP_FAILURE,
+ ("Service enumeration failed: %d: %s\n", ret, sss_strerror(ret)));
+ tevent_req_error(req, ret);
+ return;
}
/* Ok, we've completed an enumeration. Save this to the