[icinga-checkins] icinga.org: icinga-core/mfriedrich/fixes: Fix config parsing

git at icinga.org git at icinga.org
Sun Jan 10 08:40:17 CET 2010


Module: icinga-core
Branch: mfriedrich/fixes
Commit: d47a39595521568c4b3d2ca4bb9e86d006ff3b1f
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d47a39595521568c4b3d2ca4bb9e86d006ff3b1f

Author: Hendrik Baecker <andurin at process-zero.de>
Date:   Sat Jan  9 10:55:24 2010 +0100

Fix config parsing

This patch allows the user to have a icinga_user or a nagios_user directive in main config file

---

 base/config.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/base/config.c b/base/config.c
index 7a9514b..0b32da7 100644
--- a/base/config.c
+++ b/base/config.c
@@ -489,14 +489,14 @@ int read_main_config_file(char *main_config_file){
 			ochp_command=(char *)strdup(value);
 		        }
 
-		else if(!strcmp(variable,"icinga_user")){
+		else if(!strcmp(variable, "icinga_user") || !strcmp(variable, "nagios_user")){
 			my_free(nagios_user);
-			nagios_user=(char *)strdup(value);
+			nagios_user = (char *)strdup(value);
 		        }
 
-		else if(!strcmp(variable,"icinga_group")){
+		else if(!strcmp(variable, "icinga_group") || !strcmp(variable, "nagios_group")){
 			my_free(nagios_group);
-			nagios_group=(char *)strdup(value);
+			nagios_group = (char *)strdup(value);
 		        }
 
 		else if(!strcmp(variable,"admin_email")){





More information about the icinga-checkins mailing list