URL: https://github.com/SSSD/sssd/pull/194
Author: mzidek-rh
 Title: #194: config-check: Message when sssd.conf is missing
Action: opened

PR body:
"""
sssctl config-check should print a message for user
if no sssd.conf was found.

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

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/194/head:pr194
git checkout pr194
From bc275a55aa03619167eb71a8275f1f8c194573ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20=C5=BDidek?= <mzi...@redhat.com>
Date: Tue, 14 Mar 2017 15:43:41 +0100
Subject: [PATCH] config-check: Message when sssd.conf is missing

sssctl config-check should print a message for user
if no sssd.conf was found.

Resolves:
https://pagure.io/SSSD/sssd/issue/3330
---
 src/tools/sssctl/sssctl_config.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/tools/sssctl/sssctl_config.c b/src/tools/sssctl/sssctl_config.c
index 630df3c..1a7daa1 100644
--- a/src/tools/sssctl/sssctl_config.c
+++ b/src/tools/sssctl/sssctl_config.c
@@ -64,6 +64,9 @@ errno_t sssctl_config_check(struct sss_cmdline *cmdline,
     /* Open config file */
     ret = sss_ini_config_file_open(init_data, SSSD_CONFIG_FILE);
     if (ret != EOK) {
+        if (ret == ENOENT) {
+            ERROR("SSSD configuration file does not exist.\n");
+        }
         DEBUG(SSSDBG_TRACE_FUNC,
               "sss_ini_config_file_open failed: %s [%d]\n",
               sss_strerror(ret),
_______________________________________________
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org

Reply via email to