From 6a1deabbc1918de34de65595142bbb2895d90ed9 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 24 Nov 2009 20:50:52 +0100 Subject: Warn visibly about permission problems with the config file Fixes: #268 --- server/monitor/monitor.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 7801c60c..65b9475c 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -2525,7 +2525,14 @@ 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) return 4; + if (ret != EOK) { + if (ret == EIO) { + DEBUG(1, ("Cannot read configuration file %s\n", config_file)); + ERROR("Cannot read config file %s, please check if permissions " + "are 0600 and the file is owned by root.root\n", config_file); + } + return 4; + } /* set up things like debug , signals, daemonization, etc... */ ret = server_setup("sssd", flags, CONFDB_MONITOR_CONF_ENTRY, &main_ctx); -- cgit