summaryrefslogtreecommitdiff
path: root/src/monitor
diff options
context:
space:
mode:
authorAriel Barria <olivares73@hotmail.com>2013-04-03 14:57:46 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-04-12 19:09:24 +0200
commit0ae402cee3485fb5830ce0ffcf9e566c38fa287f (patch)
tree098a9806252025d0c74486a8b1c152f060f11a88 /src/monitor
parent9d890186ec2b511aa30a9574543f29e1ef56e0e8 (diff)
downloadsssd-0ae402cee3485fb5830ce0ffcf9e566c38fa287f.tar.gz
sssd-0ae402cee3485fb5830ce0ffcf9e566c38fa287f.tar.bz2
sssd-0ae402cee3485fb5830ce0ffcf9e566c38fa287f.zip
Confusing error messages for invalid sssd.conf
https://fedorahosted.org/sssd/ticket/1625 Amending errors messages and add other error codes to be more specific and avoid confusion.
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 7a543908..4e81f559 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -2767,17 +2767,19 @@ int main(int argc, const char *argv[])
/* Parse config file, fail if cannot be done */
ret = load_configuration(tmp_ctx, config_file, &monitor);
if (ret != EOK) {
- if (ret == EPERM) {
- DEBUG(1, ("Cannot read configuration file %s\n", config_file));
- sss_log(SSS_LOG_ALERT,
- "Cannot read config file %s, please check if permissions "
- "are 0600 and the file is owned by root.root", config_file);
- } else {
- DEBUG(SSSDBG_CRIT_FAILURE, ("Error loading configuration database: "
- "[%d]: %s\n", ret, strerror(ret)));
+ switch (ret) {
+ case EPERM:
+ case EACCES:
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Insufficient permissions to read configuration file.\n"));
+ break;
+ default:
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("SSSD couldn't load the configuration database.\n"));
sss_log(SSS_LOG_ALERT,
- "Cannot load configuration database: [%d]: %s",
+ "SSSD couldn't load the configuration database [%d]: %s.\n",
ret, strerror(ret));
+ break;
}
return 4;
}