|
|
71e593 |
From c0d527f9ea9786712b86b5b51c6dab074a66342d Mon Sep 17 00:00:00 2001
|
|
|
71e593 |
From: Tomas Halman <thalman@redhat.com>
|
|
|
71e593 |
Date: Mon, 1 Oct 2018 15:49:06 +0200
|
|
|
71e593 |
Subject: [PATCH] confdb: log an error when domain is misconfigured
|
|
|
71e593 |
|
|
|
71e593 |
We need to inform user that there is misconfiguration
|
|
|
71e593 |
and particular domain will not be started.
|
|
|
71e593 |
|
|
|
71e593 |
Resolves:
|
|
|
71e593 |
https://pagure.io/SSSD/sssd/issue/3827
|
|
|
71e593 |
|
|
|
71e593 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
71e593 |
(cherry picked from commit 081b18e75c746f9a2ad1fb412c825293090311f8)
|
|
|
71e593 |
---
|
|
|
71e593 |
src/confdb/confdb.c | 9 ++++++++-
|
|
|
71e593 |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
71e593 |
|
|
|
71e593 |
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
|
|
|
71e593 |
index 954c3ba766617f7cfcf637d9143c891bd998d7ff..2f3d90087e640f77835400b11184b684852d7fda 100644
|
|
|
71e593 |
--- a/src/confdb/confdb.c
|
|
|
71e593 |
+++ b/src/confdb/confdb.c
|
|
|
71e593 |
@@ -39,6 +39,9 @@
|
|
|
71e593 |
#define SAME_DOMAINS_ERROR_MSG "Domain '%s' is the same as or differs only "\
|
|
|
71e593 |
"in case from domain '%s'.\n"
|
|
|
71e593 |
|
|
|
71e593 |
+#define RETRIEVE_DOMAIN_ERROR_MSG "Error (%d [%s]) retrieving domain [%s], "\
|
|
|
71e593 |
+ "skipping!\n"
|
|
|
71e593 |
+
|
|
|
71e593 |
static char *prepend_cn(char *str, int *slen, const char *comp, int clen)
|
|
|
71e593 |
{
|
|
|
71e593 |
char *ret;
|
|
|
71e593 |
@@ -1522,8 +1525,12 @@ int confdb_get_domains(struct confdb_ctx *cdb,
|
|
|
71e593 |
ret = confdb_get_domain_internal(cdb, cdb, domlist[i], &domain);
|
|
|
71e593 |
if (ret) {
|
|
|
71e593 |
DEBUG(SSSDBG_FATAL_FAILURE,
|
|
|
71e593 |
- "Error (%d [%s]) retrieving domain [%s], skipping!\n",
|
|
|
71e593 |
+ RETRIEVE_DOMAIN_ERROR_MSG,
|
|
|
71e593 |
ret, sss_strerror(ret), domlist[i]);
|
|
|
71e593 |
+ sss_log(SSS_LOG_CRIT,
|
|
|
71e593 |
+ RETRIEVE_DOMAIN_ERROR_MSG,
|
|
|
71e593 |
+ ret, sss_strerror(ret), domlist[i]);
|
|
|
71e593 |
+
|
|
|
71e593 |
continue;
|
|
|
71e593 |
}
|
|
|
71e593 |
|
|
|
71e593 |
--
|
|
|
71e593 |
2.14.4
|
|
|
71e593 |
|