summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2020-12-17 19:52:39 -0500
committerMichael Orlitzky <mjo@gentoo.org>2020-12-17 19:52:39 -0500
commit2de1bdef8744c467630be10ee4d2c723a05e708d (patch)
treea9aca703b3dab70f00babe3de4508ec9c66e2457 /app-antivirus
parentkde-apps/khelpcenter: Revert Update DEPENDs (diff)
downloadgentoo-2de1bdef8744c467630be10ee4d2c723a05e708d.tar.gz
gentoo-2de1bdef8744c467630be10ee4d2c723a05e708d.tar.bz2
gentoo-2de1bdef8744c467630be10ee4d2c723a05e708d.zip
app-antivirus/clamav: new revision with an upstream freshclam patch.
This -r2 adds a patch to ensure that freshclam does not validate invalid databases and crash your clamd on the subsequent reload. Upstream-bug: https://bugzilla.clamav.net/show_bug.cgi?id=12522 Package-Manager: Portage-3.0.9, Repoman-3.0.2 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/clamav/clamav-0.103.0-r2.ebuild (renamed from app-antivirus/clamav/clamav-0.103.0-r1.ebuild)1
-rw-r--r--app-antivirus/clamav/files/clamav-0.103.0-freshclam-db-test-fix.patch27
2 files changed, 28 insertions, 0 deletions
diff --git a/app-antivirus/clamav/clamav-0.103.0-r1.ebuild b/app-antivirus/clamav/clamav-0.103.0-r2.ebuild
index 52721c9856a2..1ebe1bd96d9f 100644
--- a/app-antivirus/clamav/clamav-0.103.0-r1.ebuild
+++ b/app-antivirus/clamav/clamav-0.103.0-r2.ebuild
@@ -55,6 +55,7 @@ PATCHES=(
"${FILESDIR}/${PN}-0.102.2-fix-curl-detection.patch" #709616
"${FILESDIR}/${PN}-0.103.0-system-tomsfastmath.patch" # 649394
"${FILESDIR}/${PN}-0.103.0-upstream-openrc.patch"
+ "${FILESDIR}/${PN}-0.103.0-freshclam-db-test-fix.patch"
)
src_prepare() {
diff --git a/app-antivirus/clamav/files/clamav-0.103.0-freshclam-db-test-fix.patch b/app-antivirus/clamav/files/clamav-0.103.0-freshclam-db-test-fix.patch
new file mode 100644
index 000000000000..25ae94b9fb85
--- /dev/null
+++ b/app-antivirus/clamav/files/clamav-0.103.0-freshclam-db-test-fix.patch
@@ -0,0 +1,27 @@
+diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c
+index 8db3b8001..8cde8c9a8 100644
+--- a/freshclam/freshclam.c
++++ b/freshclam/freshclam.c
+@@ -280,6 +280,14 @@ fc_error_t download_complete_callback(const char *dbFilename, void *context)
+ goto done;
+ }
+ } else {
++ /*
++ * Attempt to test database in a child process.
++ */
++
++ /* We need to be able to wait for the child process ourselves.
++ * We'll re-enable wait in the global handler when we're done. */
++ g_sigchildWait = 0;
++
+ switch (pid = fork()) {
+ case -1: {
+ /*
+@@ -391,6 +399,7 @@ done:
+ logg("!Database test FAILED.\n");
+ }
+
++ /* Re-enable the global handler's child process wait */
+ g_sigchildWait = 1;
+
+ return status;