From: <gi...@ba...> - 2014-04-02 08:44:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Bacula Community source". The branch, Branch-7.0 has been updated via 535edc289cabb3199a3012ca03a9d3ffcda73143 (commit) via c4751687fc69de972f9fc9618690b580895b2d5b (commit) from 479b5d51b97eaaca4f22b3c55ced5ca4e9d87657 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 535edc289cabb3199a3012ca03a9d3ffcda73143 Author: Ulrich Leodolter <ulr...@ob...> Date: Wed Apr 2 10:44:06 2014 +0200 Fix linking check_bacula commit c4751687fc69de972f9fc9618690b580895b2d5b Author: Ulrich Leodolter <ulr...@ob...> Date: Wed Apr 2 10:43:35 2014 +0200 Fix new SD login in check_bacula ----------------------------------------------------------------------- Summary of changes: diff --git a/bacula/examples/nagios/check_bacula/Makefile.in b/bacula/examples/nagios/check_bacula/Makefile.in index 235efbf..5c22e2a 100644 --- a/bacula/examples/nagios/check_bacula/Makefile.in +++ b/bacula/examples/nagios/check_bacula/Makefile.in @@ -70,7 +70,7 @@ devclean: realclean (cd $(srcdir); $(RMF) Makefile) install: all - $(INSTALL_PROGRAM) check_bacula $(DESTDIR)$(sbindir)/check_bacula + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) check_bacula $(DESTDIR)$(sbindir)/check_bacula uninstall: (cd $(DESTDIR)$(sbindir); $(RMF) check_bacula) diff --git a/bacula/examples/nagios/check_bacula/authenticate.c b/bacula/examples/nagios/check_bacula/authenticate.c index 0eb1c8f..691b5cf 100644 --- a/bacula/examples/nagios/check_bacula/authenticate.c +++ b/bacula/examples/nagios/check_bacula/authenticate.c @@ -50,12 +50,14 @@ static char DIRhello[] = "Hello %s calling\n"; /* Response from Director */ static char DIROKhello[] = "1000 OK:"; -/* Commands sent to Storage daemon and File daemon and received - * from the User Agent */ -static char SDFDhello[] = "Hello Director %s calling\n"; +/* Commands sent to Storage daemon */ +static char SDhello[] = "Hello SD: Bacula Director %s calling\n"; + +/* Commands sent to File daemon */ +static char FDhello[] = "Hello Director %s calling\n"; /* Response from SD */ -static char SDOKhello[] = "3000 OK Hello\n"; +static char SDOKhello[] = "3000 OK Hello"; /* Response from FD */ static char FDOKhello[] = "2000 OK Hello"; @@ -114,7 +116,7 @@ int authenticate_storage_daemon(BSOCK *sd, char *sdname, char* password) bash_spaces(dirname); /* Timeout Hello after 5 mins */ btimer_t *tid = start_bsock_timer(sd, 60 * 5); - if (!sd->fsend(SDFDhello, dirname)) { + if (!sd->fsend(SDhello, dirname)) { stop_bsock_timer(tid); return 0; } @@ -130,7 +132,7 @@ int authenticate_storage_daemon(BSOCK *sd, char *sdname, char* password) } Dmsg1(110, "<stored: %s", sd->msg); stop_bsock_timer(tid); - if (strncmp(sd->msg, SDOKhello, sizeof(SDOKhello)) != 0) { + if (strncmp(sd->msg, SDOKhello, strlen(SDOKhello)) != 0) { return 0; } return 1; @@ -153,7 +155,7 @@ int authenticate_file_daemon(BSOCK *fd, char *fdname, char *password) bash_spaces(dirname); /* Timeout Hello after 5 mins */ btimer_t *tid = start_bsock_timer(fd, 60 * 5); - if (!fd->fsend(SDFDhello, dirname)) { + if (!fd->fsend(FDhello, dirname)) { stop_bsock_timer(tid); return 0; } diff --git a/bacula/examples/nagios/check_bacula/makeit b/bacula/examples/nagios/check_bacula/makeit deleted file mode 100755 index 1cf3b1d..0000000 --- a/bacula/examples/nagios/check_bacula/makeit +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make LIBS="-lpthread -ldl -lssl -lcrypto -lz" hooks/post-receive -- Bacula Community source |