URL: https://github.com/SSSD/sssd/pull/5625 Author: DeepakDas7 Title: #5625: SSSD Log: log_error_reading_file_msg_modification Action: synchronized
To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/5625/head:pr5625 git checkout pr5625
From 90c662be3a5477e36cb2c2d36c05ec1e8d78f669 Mon Sep 17 00:00:00 2001 From: Deepak Das <[email protected]> Date: Tue, 25 May 2021 16:39:53 +0530 Subject: [PATCH] SSSD Log: log_error_reading_file_msg_modification Replacing error reading file error code with proper message Resolves: https://github.com/SSSD/sssd/issues/5615 --- src/providers/fail_over.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c index 64344ff3fb..697e6a875f 100644 --- a/src/providers/fail_over.c +++ b/src/providers/fail_over.c @@ -29,6 +29,7 @@ #include <stdbool.h> #include <strings.h> #include <talloc.h> +#include <netdb.h> #include "util/dlinklist.h" #include "util/refcount.h" @@ -1188,9 +1189,19 @@ fo_resolve_service_done(struct tevent_req *subreq) &common->rhostent); talloc_zfree(subreq); if (ret != EOK) { - DEBUG(SSSDBG_CRIT_FAILURE, "Failed to resolve server '%s': %s\n", + if (resolv_status == ARES_EFILE) { + /* resolv_strerror(resolv_status) provided msg from c-ares lib. + * c-ares lib in most distros will default to /etc/hosts for + * file based host resolving */ + DEBUG(SSSDBG_CRIT_FAILURE, "Failed to resolve server '%s': %s [%s]\n", + common->name, + resolv_strerror(resolv_status), + _PATH_HOSTS); + } else { + DEBUG(SSSDBG_CRIT_FAILURE, "Failed to resolve server '%s': %s\n", common->name, resolv_strerror(resolv_status)); + } /* If the resolver failed to resolve a hostname but did not * encounter an error, tell the caller to retry another server. *
_______________________________________________ sssd-devel mailing list -- [email protected] To unsubscribe send an email to [email protected] Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/[email protected] Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure
