From d6ffab9ba524e954a13e97fe79a1021d2d5f13bc Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Wed, 29 Dec 2010 09:41:34 +0100 Subject: [PATCH] Handle all FD version in check_bacula --- bacula/examples/nagios/check_bacula/authenticate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bacula/examples/nagios/check_bacula/authenticate.c b/bacula/examples/nagios/check_bacula/authenticate.c index 6b20daa64b..c209990b56 100644 --- a/bacula/examples/nagios/check_bacula/authenticate.c +++ b/bacula/examples/nagios/check_bacula/authenticate.c @@ -57,9 +57,7 @@ static char SDFDhello[] = "Hello Director %s calling\n"; /* Response from SD */ static char SDOKhello[] = "3000 OK Hello\n"; /* Response from FD */ -static char FDOKhello[] = "2000 OK Hello\n"; -static char FD3OKhello[] = "2000 OK Hello 1\n"; -static char FD31OKhello[] = "2000 OK Hello 2\n"; +static char FDOKhello[] = "2000 OK Hello"; /* Forward referenced functions */ @@ -171,9 +169,7 @@ int authenticate_file_daemon(BSOCK *fd, char *fdname, char *password) } Dmsg1(110, "msg); stop_bsock_timer(tid); - if ((strncmp(fd->msg, FDOKhello, sizeof(FDOKhello)) != 0) && - (strncmp(fd->msg, FD3OKhello, sizeof(FD3OKhello)) != 0) && - (strncmp(fd->msg, FD31OKhello, sizeof(FD31OKhello)) != 0) ) { + if ((strncmp(fd->msg, FDOKhello, strlen(FDOKhello)) != 0)) { return 0; } return 1; -- 2.39.5