Browse Source

Update nrpe.c

The NRPE agent and the check_nrpe plugin by default, would log errors to syslog.
Added the ability to turn off logging to syslog and set the default to be off.
tgriep 7 years ago
parent
commit
4161601dc1
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/nrpe.c

+ 5 - 0
src/nrpe.c

@@ -160,6 +160,8 @@ static void my_disconnect_sighandler(int sig);
 static void complete_SSL_shutdown(SSL *);
 #endif
 
+int enable_syslog = FALSE;
+
 int main(int argc, char **argv)
 {
 	int       result = OK;
@@ -881,6 +883,9 @@ int read_config_file(char *filename)
 		else if (!strcmp(varname, "dont_blame_nrpe"))
 			allow_arguments = (atoi(varvalue) == 1) ? TRUE : FALSE;
 
+		else if (!strcmp(varname, "enable_syslog"))
+			enable_syslog = (atoi(varvalue) == 1) ? TRUE : FALSE;
+
 		else if (!strcmp(varname, "allow_bash_command_substitution"))
 			allow_bash_cmd_subst = (atoi(varvalue) == 1) ? TRUE : FALSE;