summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bareos/PKGBUILD8
-rw-r--r--bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch38
-rw-r--r--bareos/delete-bugs.patch15
3 files changed, 42 insertions, 19 deletions
diff --git a/bareos/PKGBUILD b/bareos/PKGBUILD
index 46fe0e153..949b619f2 100644
--- a/bareos/PKGBUILD
+++ b/bareos/PKGBUILD
@@ -21,7 +21,7 @@ pkgname=("${pkgbase}-common"
"${pkgbase}-webui")
pkgver=21.1.2
-pkgrel=4
+pkgrel=5
arch=(x86_64 i486 i686 pentium4 armv6h armv7h aarch64)
groups=('bareos')
pkgdesc="Bareos - Backup Archiving REcovery Open Sourced"
@@ -51,17 +51,17 @@ makedepends_armv6h=("${_pinned_dependencies_libmariadbclient[@]}")
makedepends_armv7h=("${_pinned_dependencies_libmariadbclient[@]}")
makedepends_aarch64=(ceph "${_pinned_dependencies_libmariadbclient[@]}")
source=("$pkgbase-$pkgver.tar.gz::https://github.com/$pkgbase/$pkgbase/archive/Release/$pkgver.tar.gz"
-'delete-bugs.patch'
+'ce3339d28623b8bb771e5e0aa139168df5963c4b.patch'
'xattr.patch'
'check-if-bareos-backup-is-running')
sha512sums=('acdc787ff828add93c81b2b7d293dec90f2aa22aa3aee3002662bd30e88dc0dc58b753bb63ca7c111fac6c7eeea888938236c1169f92ed6cec27941036c7b6b1'
- 'ee87bd6ae51586882c72ac1bc6088231c95dbd82ccc447d67cd4d97847f5da771f01bf0878681292234a77218786c34644b3ed958b8d6a5c17af2ec168d1b457'
+ '9c5b3ff610d50d0aef5de8ca0f2ed49bb72817a5a044013b87762139b048382b9a0949129ecf1788443363ef1dd4e70e773c985490dda1fae12212a4170da5aa'
'c535f89866816669208d56e21ffb13f70aa962e578847bc7bcc76a3e8ad54b252c8e09b745b500064d6f02cb5497cb81b62dd1c156d2e907c393aaa091aa5f0e'
'0235763891f368c13931f0fc43e3ae2d7ec796b7ef35896b6b9c048345d539308abe4a9bafda4e95221a89231d2f373ac3cfc2098d572d4068a1c068d27452f6')
prepare() {
cd $pkgbase-Release-$pkgver
- patch -p1 -i ../delete-bugs.patch
+ patch -p1 -i ../ce3339d28623b8bb771e5e0aa139168df5963c4b.patch
patch -p1 -i ../xattr.patch
}
diff --git a/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch b/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch
new file mode 100644
index 000000000..ca899fd0d
--- /dev/null
+++ b/bareos/ce3339d28623b8bb771e5e0aa139168df5963c4b.patch
@@ -0,0 +1,38 @@
+From ce3339d28623b8bb771e5e0aa139168df5963c4b Mon Sep 17 00:00:00 2001
+From: Andreas Rogge <andreas.rogge@bareos.com>
+Date: Wed, 2 Feb 2022 19:41:25 +0100
+Subject: [PATCH] lib: fix use-after-free in timer_thread
+
+---
+ core/src/lib/timer_thread.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/src/lib/timer_thread.cc b/core/src/lib/timer_thread.cc
+index 7ec8021989..1624ddd4f0 100644
+--- a/core/src/lib/timer_thread.cc
++++ b/core/src/lib/timer_thread.cc
+@@ -2,7 +2,7 @@
+ BAREOSĀ® - Backup Archiving REcovery Open Sourced
+
+ Copyright (C) 2002-2011 Free Software Foundation Europe e.V.
+- Copyright (C) 2019-2019 Bareos GmbH & Co. KG
++ Copyright (C) 2019-2022 Bareos GmbH & Co. KG
+
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version three of the GNU Affero General Public
+@@ -204,6 +204,7 @@ static bool RunOneItem(TimerThread::Timer* p,
+ = std::chrono::steady_clock::now();
+
+ bool remove_from_list = false;
++ next_timer_run = min(p->scheduled_run_timepoint, next_timer_run);
+ if (p->is_active && last_timer_run_timepoint > p->scheduled_run_timepoint) {
+ LogMessage(p);
+ p->user_callback(p);
+@@ -215,7 +216,6 @@ static bool RunOneItem(TimerThread::Timer* p,
+ p->scheduled_run_timepoint = last_timer_run_timepoint + p->interval;
+ }
+ }
+- next_timer_run = min(p->scheduled_run_timepoint, next_timer_run);
+ return remove_from_list;
+ }
+
diff --git a/bareos/delete-bugs.patch b/bareos/delete-bugs.patch
deleted file mode 100644
index 2fb7415ef..000000000
--- a/bareos/delete-bugs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/core/src/lib/timer_thread.cc 2022-03-17 17:22:34.000000000 +0100
-+++ b/core/src/lib/timer_thread.cc 2022-05-15 19:28:30.410009804 +0200
-@@ -213,9 +213,11 @@
- remove_from_list = true;
- } else {
- p->scheduled_run_timepoint = last_timer_run_timepoint + p->interval;
-+ next_timer_run = min(p->scheduled_run_timepoint, next_timer_run);
- }
-+ } else {
-+ next_timer_run = min(p->scheduled_run_timepoint, next_timer_run);
- }
-- next_timer_run = min(p->scheduled_run_timepoint, next_timer_run);
- return remove_from_list;
- }
-