Hi,
had to add to the patch to authenticate.c. This one is the valid one:
--- authenticate.c.orig 2007-11-22 12:45:01.000000000 +0100
+++ authenticate.c 2009-11-30 11:45:42.561530182 +0100
@@ -58,6 +58,8 @@
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";
/* Forward referenced functions */
@@ -169,7 +171,9 @@
}
Dmsg1(110, "<stored: %s", fd->msg);
stop_bsock_timer(tid);
- if (strncmp(fd->msg, FDOKhello, sizeof(FDOKhello)) != 0) {
+ if ((strncmp(fd->msg, FDOKhello, sizeof(FDOKhello)) != 0) &&
+ (strncmp(fd->msg, FD3OKhello, sizeof(FD3OKhello)) != 0) &&
+ (strncmp(fd->msg, FD31OKhello, sizeof(FD31OKhello)) != 0) ) {
return 0;
}
return 1;
29.11.2009 23:52, Arno Lehmann wrote:
> I've got three patches here.
>
> One to examples/nagios:
>
> --- prepare_for_check_bacula.old 2009-11-29 23:20:26.375334590
> +0100
> +++ prepare_for_check_bacula 2009-11-29 23:29:44.726534601 +0100
> @@ -10,7 +10,7 @@
> mv -uiv configure configure.without_check_bacula
>
> # Modify ./configure
> -sed -e 's/\(ac_config_files=".*$PFILES\)"/\1
> src\/check_bacula\/Makefile"/' -e 's/\(^ *# Handling of
> arguments.*$\)/\1\n "src\/check_bac ula\/Makefile" )
> CONFIG_FILES="$CONFIG_FILES src\/check_bacula\/Makefile" ;;/'
> configure.without_check_bacula > configure
> +sed -e 's/\(ac_config_files=".*$PFILES\)"/\1
> src\/check_bacula\/Makefile"/' -e 's/\(^ case $ac_config_target
> in$\)/\1\n "src\/check_b acula\/Makefile" )
> CONFIG_FILES="$CONFIG_FILES src\/check_bacula\/Makefile" ;;/'
> configure.without_check_bacula > configure
> chmod a+x configure
>
> # extract check_bacula source
>
>
> And two patches for the files currently packaged in
> examples/nagios/nagios_plugin_check_bacula.tgz:
>
> - initialize lock manager
> - successfully authenticate against v.3 FDs (response 2000 OK Hello 1)
>
> --- check_bacula.c.orig 2009-11-29 23:14:11.978461428 +0100
> +++ check_bacula.c 2009-11-29 23:14:35.075255557 +0100
> @@ -156,6 +156,7 @@
> exit(STATE_UNKNOWN);
> }
>
> + lmgr_init_thread();
>
> char sig[100];
> MD5Init(&md5c);
>
>
>
> --- authenticate.c.orig 2007-11-22 12:45:01.000000000 +0100
> +++ authenticate.c 2009-11-29 23:08:22.154434086 +0100
> @@ -58,6 +58,7 @@
> 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";
>
> /* Forward referenced functions */
>
> @@ -169,7 +170,8 @@
> }
> Dmsg1(110, "<stored: %s", fd->msg);
> stop_bsock_timer(tid);
> - if (strncmp(fd->msg, FDOKhello, sizeof(FDOKhello)) != 0) {
> + if ((strncmp(fd->msg, FDOKhello, sizeof(FDOKhello)) != 0) &&
> + (strncmp(fd->msg, FD3OKhello, sizeof(FD3OKhello)) != 0)) {
> return 0;
> }
> return 1;
>
>
> Those patches work ok here. No guarantees that they work anywhere else :-)
>
> Cheers,
>
> Arno
>
--
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel