URL: https://github.com/SSSD/sssd/pull/194 Author: mzidek-rh Title: #194: config-check: Message when sssd.conf is missing Action: synchronized
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 de84760db61c618ef75c65111f86041471b78ddd 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/sssctl/sssctl_config.c b/src/tools/sssctl/sssctl_config.c index 630df3c..510e1c0 100644 --- a/src/tools/sssctl/sssctl_config.c +++ b/src/tools/sssctl/sssctl_config.c @@ -63,7 +63,10 @@ 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("File "SSSD_CONFIG_FILE" does not exist.\n"); + goto done; + } else if (ret != EOK) { 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