URL: https://github.com/SSSD/sssd/pull/663
Author: thalman
 Title: #663: confdb: log an error when domain is misconfigured
Action: opened

PR body:
"""
We need to inform user that there is misconfiguration
and particular domain will not be started.

Resolves:
https://pagure.io/SSSD/sssd/issue/3827
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/663/head:pr663
git checkout pr663
From 8e6df27ad521974dea0fd19841ded13d395b42ef Mon Sep 17 00:00:00 2001
From: Tomas Halman <thal...@redhat.com>
Date: Mon, 1 Oct 2018 15:49:06 +0200
Subject: [PATCH] confdb: log an error when domain is misconfigured

We need to inform user that there is misconfiguration
and particular domain will not be started.

Resolves:
https://pagure.io/SSSD/sssd/issue/3827
---
 src/confdb/confdb.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
index 954c3ba76..2f3d90087 100644
--- a/src/confdb/confdb.c
+++ b/src/confdb/confdb.c
@@ -39,6 +39,9 @@
 #define SAME_DOMAINS_ERROR_MSG "Domain '%s' is the same as or differs only "\
                                "in case from domain '%s'.\n"
 
+#define RETRIEVE_DOMAIN_ERROR_MSG "Error (%d [%s]) retrieving domain [%s], "\
+                                  "skipping!\n"
+
 static char *prepend_cn(char *str, int *slen, const char *comp, int clen)
 {
     char *ret;
@@ -1522,8 +1525,12 @@ int confdb_get_domains(struct confdb_ctx *cdb,
         ret = confdb_get_domain_internal(cdb, cdb, domlist[i], &domain);
         if (ret) {
             DEBUG(SSSDBG_FATAL_FAILURE,
-                  "Error (%d [%s]) retrieving domain [%s], skipping!\n",
+                  RETRIEVE_DOMAIN_ERROR_MSG,
                   ret, sss_strerror(ret), domlist[i]);
+            sss_log(SSS_LOG_CRIT,
+                    RETRIEVE_DOMAIN_ERROR_MSG,
+                    ret, sss_strerror(ret), domlist[i]);
+
             continue;
         }
 
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org

Reply via email to