summaryrefslogtreecommitdiffstats
path: root/src/monitor
diff options
context:
space:
mode:
authorPavel Reichl <preichl@redhat.com>2014-02-05 17:32:20 +0000
committerJakub Hrozek <jhrozek@redhat.com>2014-02-11 21:47:44 +0100
commitb3cc9b98966fa2d90172348c334b3b70c5261ab3 (patch)
tree022545f7375dd836c8e0d09023d3b385bef8b144 /src/monitor
parent31a27b63617dcfb719cb246d8e1f062988328e01 (diff)
downloadsssd-b3cc9b98966fa2d90172348c334b3b70c5261ab3.tar.gz
sssd-b3cc9b98966fa2d90172348c334b3b70c5261ab3.tar.xz
sssd-b3cc9b98966fa2d90172348c334b3b70c5261ab3.zip
MONITOR: Incorrect permissions on sssd.conf
Print user friendly warning when permissions on sssd.conf are incorrect and provide hint. Resolves: https://fedorahosted.org/sssd/ticket/2208 Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Diffstat (limited to 'src/monitor')
-rw-r--r--src/monitor/monitor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 5645ddcf4..c3825d86d 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -84,6 +84,11 @@
*/
#define KRB5_RCACHE_DIR_DISABLE "__LIBKRB5_DEFAULTS__"
+/* Warning messages */
+#define CONF_FILE_PERM_ERROR_MSG "Cannot read config file %s. Please check "\
+ "if permissions are 0600 and the file is "\
+ "owned by root.root."
+
int cmdline_debug_level;
int cmdline_debug_timestamps;
int cmdline_debug_microseconds;
@@ -2816,7 +2821,8 @@ int main(int argc, const char *argv[])
case EPERM:
case EACCES:
DEBUG(SSSDBG_CRIT_FAILURE,
- ("Insufficient permissions to read configuration file.\n"));
+ (CONF_FILE_PERM_ERROR_MSG, config_file));
+ sss_log(SSS_LOG_ALERT, CONF_FILE_PERM_ERROR_MSG, config_file);
break;
default:
DEBUG(SSSDBG_CRIT_FAILURE,