pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/bacula



Module Name:    pkgsrc
Committed By:   jnemeth
Date:           Sun May 16 06:56:31 UTC 2021

Modified Files:
        pkgsrc/sysutils/bacula: Makefile distinfo
Added Files:
        pkgsrc/sysutils/bacula/patches: patch-src_dird_dird.c

Log Message:
Update bacula to 9.6.7nb2.

This is to fix upstream bug #2551.  This was originally thought to
only be a display problem, but can actually cause undesired database
access concurrency and possibly races.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 pkgsrc/sysutils/bacula/Makefile
cvs rdiff -u -r1.57 -r1.58 pkgsrc/sysutils/bacula/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/bacula/patches/patch-src_dird_dird.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/bacula/Makefile
diff -u pkgsrc/sysutils/bacula/Makefile:1.89 pkgsrc/sysutils/bacula/Makefile:1.90
--- pkgsrc/sysutils/bacula/Makefile:1.89        Wed Apr 21 11:42:38 2021
+++ pkgsrc/sysutils/bacula/Makefile     Sun May 16 06:56:31 2021
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.89 2021/04/21 11:42:38 adam Exp $
+# $NetBSD: Makefile,v 1.90 2021/05/16 06:56:31 jnemeth Exp $
 
 CONFLICTS+=            bacula-client-[0-9]* bacula-clientonly-[0-9]* bareos-[0-9]* bareos-clientonly-[0-9]*
 
-#PKGREVISION= 3
+PKGREVISION=   2
 
-PKGREVISION= 1
 .include "options.mk"
 
 PLIST_SRC=             PLIST.common

Index: pkgsrc/sysutils/bacula/distinfo
diff -u pkgsrc/sysutils/bacula/distinfo:1.57 pkgsrc/sysutils/bacula/distinfo:1.58
--- pkgsrc/sysutils/bacula/distinfo:1.57        Sat Dec 12 23:51:19 2020
+++ pkgsrc/sysutils/bacula/distinfo     Sun May 16 06:56:31 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.57 2020/12/12 23:51:19 jnemeth Exp $
+$NetBSD: distinfo,v 1.58 2021/05/16 06:56:31 jnemeth Exp $
 
 SHA1 (bacula-9.6.7.tar.gz) = cf548f4ab0b22761dfe2ddd5e9f0f29e0ccf77c8
 RMD160 (bacula-9.6.7.tar.gz) = 9361625af2bafca9595b0f259e832fba3de75653
@@ -12,6 +12,7 @@ SHA1 (patch-src_bacula.h) = 74fed45f9d44
 SHA1 (patch-src_console_Makefile.in) = f997b8f8bc8c7cca5b06a8f046558951caa14094
 SHA1 (patch-src_console_conio.c) = 92445b01e2ad17de5215315df916f1f1bd45108b
 SHA1 (patch-src_dird_Makefile.in) = 0f088f3af4bcacb260fb50124723babd69f5caee
+SHA1 (patch-src_dird_dird.c) = e1c8580399ddfb933ea6727cc541a7bf435eb501
 SHA1 (patch-src_filed_Makefile.in) = 12d7498d65c9f4f0a844a1c4648c782ce1b5ab48
 SHA1 (patch-src_filed_bacl.c) = 6eb8d9e5198d91ea52b8ab4a31bf0cc565f3ee07
 SHA1 (patch-src_filed_bacl__freebsd.c) = 0a90b6621e3b18b43f7f9e0d7af50ba7f17ca708

Added files:

Index: pkgsrc/sysutils/bacula/patches/patch-src_dird_dird.c
diff -u /dev/null pkgsrc/sysutils/bacula/patches/patch-src_dird_dird.c:1.1
--- /dev/null   Sun May 16 06:56:31 2021
+++ pkgsrc/sysutils/bacula/patches/patch-src_dird_dird.c        Sun May 16 06:56:31 2021
@@ -0,0 +1,75 @@
+$NetBSD: patch-src_dird_dird.c,v 1.1 2021/05/16 06:56:31 jnemeth Exp $
+
+Upstream bug #2551:
+
+I noticed that the command "show catalog" is truncating the name of db_driver
+
+======================================
+*show catalog
+Catalog: name=MyCatalog address=localhost DBport=5432 db_name=bacula
+      db_driver=PostgreSQ db_user=bacula MutliDBConn=0
+*
+======================================
+
+Turns out that the bug is more than just a display problem
+(from the bacula-devel mailing list):
+
+To: bacula-devel%lists.sourceforge.net@localhost
+Message-ID: <c2515e90-0bf3-bc5e-1908-e7b23867b17a%baculasystems.com@localhost>
+Date: Wed, 20 Jan 2021 13:22:19 +0100
+Subject: Re: [Bacula-devel] Something amiss in bacula-9.6.7: Possible race
+ condition
+List-Id: Developer's email list <bacula-devel.lists.sourceforge.net>
+List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=bacula-de
+vel>
+From: Eric Bollengier via Bacula-devel <bacula-devel%lists.sourceforge.net@localhost>
+
+Hello Martin,
+
+Very good detective work, this subtle issue was causing concurrent
+database access even if the batch mode was disabled. I have pushed the
+patch into the Branch-9.6 git repository.
+
+Best Regards,
+Eric
+
+> What is the output of "show catalog" in bconsole?  My guess is that you will
+> see db_driver=MySQ i.e. missing the final "L" of MySQL.  This will prevent it
+> from reusing the BDB object, leading to unexpected concurrency.
+>
+> The bug is caused by this change:
+>
+> diff --git a/bacula/src/dird/dird.c b/bacula/src/dird/dird.c
+> index fdb1d97bf9..11c4406ea7 100644
+> --- a/bacula/src/dird/dird.c
+> +++ b/bacula/src/dird/dird.c
+> @@ -1265,7 +1265,7 @@ static bool check_catalog(cat_op mode)
+>             /* To copy dbdriver field into "CAT" catalog resource class (local
+)
+>              * from dbdriver in "BDB" catalog DB Interface class (global)
+>              */
+> -            strncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
+> +            bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
+>           }
+>        }
+>
+> which was part of 9.6.4.
+>
+> To fix it, replace db_driver_len with db_driver_len+1 in this call to
+> bstrncpy.  This has been fixed in Bacula 11 because the seemingly minor
+> problem with "status catalog" was reported in
+> https://bugs.bacula.org/view.php?id=2551 but it looks like the significance of
+> it wasn't realized.
+
+
+--- src/dird/dird.c.orig       2020-12-10 13:26:39.000000000 +0000
++++ src/dird/dird.c
+@@ -1265,7 +1265,7 @@ static bool check_catalog(cat_op mode)
+            /* To copy dbdriver field into "CAT" catalog resource class (local)
+             * from dbdriver in "BDB" catalog DB Interface class (global)
+             */
+-            bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len);
++            bstrncpy(catalog->db_driver, BDB_db_driver, db_driver_len + 1);
+          }
+       }
+ 



Home | Main Index | Thread Index | Old Index