|
|
ecf709 |
From be05d577626835e3c72d71fc60e6abfa564c7cbe Mon Sep 17 00:00:00 2001
|
|
|
ecf709 |
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzidek@redhat.com>
|
|
|
ecf709 |
Date: Tue, 14 Mar 2017 15:43:41 +0100
|
|
|
ecf709 |
Subject: [PATCH 99/99] config-check: Message when sssd.conf is missing
|
|
|
ecf709 |
MIME-Version: 1.0
|
|
|
ecf709 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ecf709 |
Content-Transfer-Encoding: 8bit
|
|
|
ecf709 |
|
|
|
ecf709 |
sssctl config-check should print a message for user
|
|
|
ecf709 |
if no sssd.conf was found.
|
|
|
ecf709 |
|
|
|
ecf709 |
Resolves:
|
|
|
ecf709 |
https://pagure.io/SSSD/sssd/issue/3330
|
|
|
ecf709 |
|
|
|
ecf709 |
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
|
|
|
ecf709 |
(cherry picked from commit 955574eeb3a3b937abc3df150e9bbbb79b75c889)
|
|
|
ecf709 |
---
|
|
|
ecf709 |
src/tools/sssctl/sssctl_config.c | 5 ++++-
|
|
|
ecf709 |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
ecf709 |
|
|
|
ecf709 |
diff --git a/src/tools/sssctl/sssctl_config.c b/src/tools/sssctl/sssctl_config.c
|
|
|
ecf709 |
index 630df3c8ff5368ef253bb9753380e94c8c0a307d..7e3ebf5428ce3fef232eee7334c7fd90e904b2d3 100644
|
|
|
ecf709 |
--- a/src/tools/sssctl/sssctl_config.c
|
|
|
ecf709 |
+++ b/src/tools/sssctl/sssctl_config.c
|
|
|
ecf709 |
@@ -63,7 +63,10 @@ errno_t sssctl_config_check(struct sss_cmdline *cmdline,
|
|
|
ecf709 |
|
|
|
ecf709 |
/* Open config file */
|
|
|
ecf709 |
ret = sss_ini_config_file_open(init_data, SSSD_CONFIG_FILE);
|
|
|
ecf709 |
- if (ret != EOK) {
|
|
|
ecf709 |
+ if (ret == ENOENT) {
|
|
|
ecf709 |
+ ERROR("File %1$s does not exist.\n", SSSD_CONFIG_FILE);
|
|
|
ecf709 |
+ goto done;
|
|
|
ecf709 |
+ } else if (ret != EOK) {
|
|
|
ecf709 |
DEBUG(SSSDBG_TRACE_FUNC,
|
|
|
ecf709 |
"sss_ini_config_file_open failed: %s [%d]\n",
|
|
|
ecf709 |
sss_strerror(ret),
|
|
|
ecf709 |
--
|
|
|
ecf709 |
2.9.3
|
|
|
ecf709 |
|