|
|
2fc102 |
From 3af4a383964cf391e0277bd8a272156a1805e357 Mon Sep 17 00:00:00 2001
|
|
|
2fc102 |
From: Pavel Reichl <preichl@redhat.com>
|
|
|
2fc102 |
Date: Wed, 5 Feb 2014 17:32:20 +0000
|
|
|
2fc102 |
Subject: [PATCH 76/80] MONITOR: Incorrect permissions on sssd.conf
|
|
|
2fc102 |
|
|
|
2fc102 |
Print user friendly warning when permissions on sssd.conf are incorrect and
|
|
|
2fc102 |
provide hint.
|
|
|
2fc102 |
|
|
|
2fc102 |
Resolves:
|
|
|
2fc102 |
https://fedorahosted.org/sssd/ticket/2208
|
|
|
2fc102 |
|
|
|
2fc102 |
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
|
|
|
2fc102 |
(cherry picked from commit b3cc9b98966fa2d90172348c334b3b70c5261ab3)
|
|
|
2fc102 |
---
|
|
|
2fc102 |
src/monitor/monitor.c | 8 +++++++-
|
|
|
2fc102 |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
2fc102 |
|
|
|
2fc102 |
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
|
|
|
2fc102 |
index 09f530d2643b45fc31fb4dbe3cb69f2abc5510af..72a8b7c4a376dd9b68349b959cb869b9da059d38 100644
|
|
|
2fc102 |
--- a/src/monitor/monitor.c
|
|
|
2fc102 |
+++ b/src/monitor/monitor.c
|
|
|
2fc102 |
@@ -84,6 +84,11 @@
|
|
|
2fc102 |
*/
|
|
|
2fc102 |
#define KRB5_RCACHE_DIR_DISABLE "__LIBKRB5_DEFAULTS__"
|
|
|
2fc102 |
|
|
|
2fc102 |
+/* Warning messages */
|
|
|
2fc102 |
+#define CONF_FILE_PERM_ERROR_MSG "Cannot read config file %s. Please check "\
|
|
|
2fc102 |
+ "if permissions are 0600 and the file is "\
|
|
|
2fc102 |
+ "owned by root.root."
|
|
|
2fc102 |
+
|
|
|
2fc102 |
int cmdline_debug_level;
|
|
|
2fc102 |
int cmdline_debug_timestamps;
|
|
|
2fc102 |
int cmdline_debug_microseconds;
|
|
|
2fc102 |
@@ -2798,7 +2803,8 @@ int main(int argc, const char *argv[])
|
|
|
2fc102 |
case EPERM:
|
|
|
2fc102 |
case EACCES:
|
|
|
2fc102 |
DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
2fc102 |
- ("Insufficient permissions to read configuration file.\n"));
|
|
|
2fc102 |
+ (CONF_FILE_PERM_ERROR_MSG, config_file));
|
|
|
2fc102 |
+ sss_log(SSS_LOG_ALERT, CONF_FILE_PERM_ERROR_MSG, config_file);
|
|
|
2fc102 |
break;
|
|
|
2fc102 |
default:
|
|
|
2fc102 |
DEBUG(SSSDBG_CRIT_FAILURE,
|
|
|
2fc102 |
--
|
|
|
2fc102 |
1.8.5.3
|
|
|
2fc102 |
|