* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2019-12-31 18:19 Aaron Bauman
0 siblings, 0 replies; 12+ messages in thread
From: Aaron Bauman @ 2019-12-31 18:19 UTC (permalink / raw
To: gentoo-commits
commit: 5ed1c8cb1bb8f72a7598817d3c3bbfe4683ec53a
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue Dec 31 07:18:27 2019 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Tue Dec 31 18:19:16 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ed1c8cb
app-antivirus/clamav: remove unused patch
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/14192
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
app-antivirus/clamav/files/clamav-0.100.0_autotools.patch | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.100.0_autotools.patch b/app-antivirus/clamav/files/clamav-0.100.0_autotools.patch
deleted file mode 100644
index 58c3b4e324f..00000000000
--- a/app-antivirus/clamav/files/clamav-0.100.0_autotools.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- clamav-0.100.0/configure.ac_orig 2018-04-12 13:12:58.201729248 +0200
-+++ clamav-0.100.0/configure.ac 2018-04-12 13:23:44.982679360 +0200
-@@ -47,6 +47,7 @@
- LT_CONFIG_LTDL_DIR([libltdl])
- LT_INIT([dlopen disable-static])
- LTDL_INIT([recursive])
-+PKG_PROG_PKG_CONFIG(0.16)
-
- m4_include([m4/reorganization/build_tools.m4])
- m4_include([m4/reorganization/headers.m4])
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2024-03-23 6:05 Arthur Zamarin
0 siblings, 0 replies; 12+ messages in thread
From: Arthur Zamarin @ 2024-03-23 6:05 UTC (permalink / raw
To: gentoo-commits
commit: 96970d5d43f186e325f81573923a984d73edae9d
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Tue Mar 19 19:19:07 2024 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 06:05:04 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96970d5d
app-antivirus/clamav: remove unused patch
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
.../clamav/files/clamav-0.103.8-c-std.patch | 204 ---------------------
1 file changed, 204 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch b/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch
deleted file mode 100644
index 91556a1ae422..000000000000
--- a/app-antivirus/clamav/files/clamav-0.103.8-c-std.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From b9e2714d5b42ad9a0742746996b989400c794adb Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 4 Nov 2022 19:31:15 -0400
-Subject: [PATCH 1/2] clamonacc/c-thread-pool/thpool.c: define _GNU_SOURCE for
- syscall().
-
-On Linux, thpool.c uses syscall() from unistd.h, but that function is
-not defined without _GNU_SOURCE:
-
- c-thread-pool/thpool.c: In function 'jobqueue_pull':
- c-thread-pool/thpool.c:474:105: error: implicit declaration of function
- 'syscall' [-Werror=implicit-function-declaration]
-
-In general that's not great, because it hinders some compiler diagnostics,
-but it will also cause problems down the road if (for example) clang-16
-decides to enable -Werror=implicit-function-declaration by default.
-
-This commit changes the _POSIX_C_SOURCE definition at the top of
-thpool.c to _GNU_SOURCE, as in the syscall(2) man page.
----
- clamonacc/c-thread-pool/thpool.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/clamonacc/c-thread-pool/thpool.c b/clamonacc/c-thread-pool/thpool.c
-index 46572da5f4..27c5103ff1 100644
---- a/clamonacc/c-thread-pool/thpool.c
-+++ b/clamonacc/c-thread-pool/thpool.c
-@@ -8,7 +8,7 @@
- *
- ********************************/
-
--#define _POSIX_C_SOURCE 200809L
-+#define _GNU_SOURCE
- #include <unistd.h>
- #include <signal.h>
- #include <stdio.h>
-
-From 7e3425ab701141064d179c45af2251f61af4ccc7 Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky <michael@orlitzky.com>
-Date: Fri, 4 Nov 2022 20:08:30 -0400
-Subject: [PATCH 2/2] */*: fix invalid prototypes.
-
-Prototypes (or the declarations themselves, if there is no
-corresponding prototype) for functions that take no arguments are
-required by the C standard to specify (void) as their argument list;
-for example,
-
- regex_pcre.h:79:1: error: function declaration isn't a prototype
- [-Werror=strict-prototypes]
- 79 | cl_error_t cli_pcre_init_internal();
-
-Future versions of clang may become strict about this, and there's no
-harm in conforming to the standard right now, so we fix all such
-instances in this commit.
----
- clamonacc/clamonacc.c | 2 +-
- clamonacc/client/socket.h | 2 +-
- clamonacc/inotif/hash.c | 2 +-
- clamonacc/inotif/inotif.c | 2 +-
- clamonacc/scan/onas_queue.c | 6 +++---
- libclamav/matcher-pcre.h | 6 +++---
- libclamav/regex_pcre.h | 2 +-
- m4/reorganization/compiler_checks.m4 | 2 +-
- shared/misc.h | 2 +-
- 9 files changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/clamonacc/clamonacc.c b/clamonacc/clamonacc.c
-index ba986ef06c..c020897908 100644
---- a/clamonacc/clamonacc.c
-+++ b/clamonacc/clamonacc.c
-@@ -61,7 +61,7 @@
- pthread_t ddd_pid = 0;
- pthread_t scan_queue_pid = 0;
-
--static void onas_handle_signals();
-+static void onas_handle_signals(void);
- static int startup_checks(struct onas_context *ctx);
- static struct onas_context *g_ctx = NULL;
-
-diff --git a/clamonacc/client/socket.h b/clamonacc/client/socket.h
-index 915f9086ca..ea84fb4c41 100644
---- a/clamonacc/client/socket.h
-+++ b/clamonacc/client/socket.h
-@@ -31,4 +31,4 @@ struct onas_sock_t {
- };
-
- cl_error_t onas_set_sock_only_once(struct onas_context *ctx);
--int onas_get_sockd();
-+int onas_get_sockd(void);
-diff --git a/clamonacc/inotif/hash.c b/clamonacc/inotif/hash.c
-index e4b3f1f983..2bbc4cdbb4 100644
---- a/clamonacc/inotif/hash.c
-+++ b/clamonacc/inotif/hash.c
-@@ -58,7 +58,7 @@
-
- #if defined(HAVE_SYS_FANOTIFY_H)
-
--static struct onas_bucket *onas_bucket_init();
-+static struct onas_bucket *onas_bucket_init(void);
- static void onas_free_bucket(struct onas_bucket *bckt);
- static int onas_bucket_insert(struct onas_bucket *bckt, struct onas_element *elem);
- static int onas_bucket_remove(struct onas_bucket *bckt, struct onas_element *elem);
-diff --git a/clamonacc/inotif/inotif.c b/clamonacc/inotif/inotif.c
-index 7799ae4889..b8680e9856 100644
---- a/clamonacc/inotif/inotif.c
-+++ b/clamonacc/inotif/inotif.c
-@@ -66,7 +66,7 @@
-
- static int onas_ddd_init_ht(uint32_t ht_size);
- static int onas_ddd_init_wdlt(uint64_t nwatches);
--static int onas_ddd_grow_wdlt();
-+static int onas_ddd_grow_wdlt(void);
-
- static int onas_ddd_watch(const char *pathname, int fan_fd, uint64_t fan_mask, int in_fd, uint64_t in_mask);
- static int onas_ddd_watch_hierarchy(const char *pathname, size_t len, int fd, uint64_t mask, uint32_t type);
-diff --git a/clamonacc/scan/onas_queue.c b/clamonacc/scan/onas_queue.c
-index d279df7415..6fa7df6e96 100644
---- a/clamonacc/scan/onas_queue.c
-+++ b/clamonacc/scan/onas_queue.c
-@@ -82,7 +82,7 @@ static cl_error_t onas_new_event_queue_node(struct onas_event_queue_node **node)
- return CL_SUCCESS;
- }
-
--static void *onas_init_event_queue()
-+static void *onas_init_event_queue(void)
- {
-
- if (CL_EMEM == onas_new_event_queue_node(&g_onas_event_queue_head)) {
-@@ -122,7 +122,7 @@ static void onas_destroy_event_queue_node(struct onas_event_queue_node *node)
- return;
- }
-
--static void onas_destroy_event_queue()
-+static void onas_destroy_event_queue(void)
- {
-
- if (NULL == g_onas_event_queue_head) {
-@@ -200,7 +200,7 @@ void *onas_scan_queue_th(void *arg)
- pthread_cleanup_pop(1);
- }
-
--static int onas_queue_is_b_empty()
-+static int onas_queue_is_b_empty(void)
- {
-
- if (g_onas_event_queue.head->next == g_onas_event_queue.tail) {
-diff --git a/libclamav/matcher-pcre.h b/libclamav/matcher-pcre.h
-index 5ffc88fb26..b0bd51852b 100644
---- a/libclamav/matcher-pcre.h
-+++ b/libclamav/matcher-pcre.h
-@@ -68,11 +68,11 @@ struct cli_pcre_meta {
- };
-
- /* PCRE PERFORMANCE DECLARATIONS */
--void cli_pcre_perf_print();
--void cli_pcre_perf_events_destroy();
-+void cli_pcre_perf_print(void);
-+void cli_pcre_perf_events_destroy(void);
-
- /* PCRE MATCHER DECLARATIONS */
--int cli_pcre_init();
-+int cli_pcre_init(void);
- cl_error_t cli_pcre_addpatt(struct cli_matcher *root, const char *virname, const char *trigger, const char *pattern, const char *cflags, const char *offset, const uint32_t *lsigid, unsigned int options);
- cl_error_t cli_pcre_build(struct cli_matcher *root, long long unsigned match_limit, long long unsigned recmatch_limit, const struct cli_dconf *dconf);
- cl_error_t cli_pcre_recaloff(struct cli_matcher *root, struct cli_pcre_off *data, struct cli_target_info *info, cli_ctx *ctx);
-diff --git a/libclamav/regex_pcre.h b/libclamav/regex_pcre.h
-index d1f4127984..52653431d4 100644
---- a/libclamav/regex_pcre.h
-+++ b/libclamav/regex_pcre.h
-@@ -76,7 +76,7 @@ struct cli_pcre_results {
- };
- #endif
-
--cl_error_t cli_pcre_init_internal();
-+cl_error_t cli_pcre_init_internal(void);
- cl_error_t cli_pcre_addoptions(struct cli_pcre_data *pd, const char **opt, int errout);
- cl_error_t cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override);
- int cli_pcre_match(struct cli_pcre_data *pd, const unsigned char *buffer, size_t buflen, size_t override_offset, int options, struct cli_pcre_results *results);
-diff --git a/m4/reorganization/compiler_checks.m4 b/m4/reorganization/compiler_checks.m4
-index f7984f4cb2..80c81e1d30 100644
---- a/m4/reorganization/compiler_checks.m4
-+++ b/m4/reorganization/compiler_checks.m4
-@@ -121,7 +121,7 @@ extern void abort(void);
- ((bb_size) > 0 && (sb_size) > 0 && (size_t)(sb_size) <= (size_t)(bb_size) \
- && (sb) >= (bb) && ((sb) + (sb_size)) <= ((bb) + (bb_size)) && ((sb) + (sb_size)) > (bb) && (sb) < ((bb) + (bb_size)))
-
--int crashtest()
-+int crashtest(void)
- {
- unsigned int backsize, dcur;
- int dval=0x12000, unp_offset;
-diff --git a/shared/misc.h b/shared/misc.h
-index 436c73117b..63fdea0f50 100644
---- a/shared/misc.h
-+++ b/shared/misc.h
-@@ -72,7 +72,7 @@ int daemonize(void);
- /*closes stdin, stdout, stderr. This is called by daemonize, but not
- * daemonize_all_return. Users of daemonize_all_return should call this
- * when initialization is complete.*/
--int close_std_descriptors();
-+int close_std_descriptors(void);
-
- /*Returns the return value of fork. All processes return */
- int daemonize_all_return(void);
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2023-08-29 7:49 Conrad Kostecki
0 siblings, 0 replies; 12+ messages in thread
From: Conrad Kostecki @ 2023-08-29 7:49 UTC (permalink / raw
To: gentoo-commits
commit: b5fac48036eaaf2af6b7b68d98d43860cc50b67d
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Aug 28 19:45:44 2023 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Tue Aug 29 07:48:30 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5fac480
app-antivirus/clamav: remove unused patch
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/32497
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
.../clamav/files/clamav-1.0.1-select-python.patch | 44 ----------------------
1 file changed, 44 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-1.0.1-select-python.patch b/app-antivirus/clamav/files/clamav-1.0.1-select-python.patch
deleted file mode 100644
index 70bedc029399..000000000000
--- a/app-antivirus/clamav/files/clamav-1.0.1-select-python.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-This patch enables us to tell CMake to find a particular python
-impl on a multi-impl system.
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -223,20 +223,26 @@ if(ENABLE_TESTS)
- find_package(Libcheck REQUIRED)
-
- # Used to generate the test files and for the application feature test framework
-- find_package(Python3 REQUIRED)
-+ # In distros that support multiple implementations of python it is helpful to specify the impl to use
-+ if(DEFINED PYTHON_FIND_VERSION)
-+ find_package(Python3 EXACT ${PYTHON_FIND_VERSION} REQUIRED)
-+ else()
-+ find_package(Python3 REQUIRED)
-+ # Not requesting a specific python impl; try using pytest from the PATH
-+ execute_process(
-+ COMMAND pytest --version
-+ RESULT_VARIABLE PYTEST_EXIT_CODE
-+ ERROR_QUIET OUTPUT_QUIET
-+ )
-
-- # First try using pytest from the PATH
-- execute_process(
-- COMMAND pytest --version
-- RESULT_VARIABLE PYTEST_EXIT_CODE
-- ERROR_QUIET OUTPUT_QUIET
-- )
-+ if(${PYTEST_EXIT_CODE} EQUAL 0)
-+ # pytest found in the path.
-+ set(PythonTest_COMMAND "pytest;-v")
-+ endif()
-+ endif()
-
-- if(${PYTEST_EXIT_CODE} EQUAL 0)
-- # pytest found in the path.
-- set(PythonTest_COMMAND "pytest;-v")
-- else()
-- # Not in the path, try using: python3 -m pytest
-+ if("${PythonTest_COMMAND}" STREQUAL "")
-+ # Not in the path or specified a python impl; try using: python3 -m pytest
- execute_process(
- COMMAND ${Python3_EXECUTABLE} -m pytest --version
- RESULT_VARIABLE PYTEST_MODULE_EXIT_CODE
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2022-02-09 23:06 Conrad Kostecki
0 siblings, 0 replies; 12+ messages in thread
From: Conrad Kostecki @ 2022-02-09 23:06 UTC (permalink / raw
To: gentoo-commits
commit: 9e2f03c77d661a29c8e068e25757e1798ed7c642
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Tue Jan 18 19:33:58 2022 +0000
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Wed Feb 9 23:02:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e2f03c7
app-antivirus/clamav: remove unused patch
Closes: https://github.com/gentoo/gentoo/pull/23862
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>
.../files/clamav-0.104.0-ncurses_detection.patch | 27 ----------------------
1 file changed, 27 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.104.0-ncurses_detection.patch b/app-antivirus/clamav/files/clamav-0.104.0-ncurses_detection.patch
deleted file mode 100644
index aa403a90bab3..000000000000
--- a/app-antivirus/clamav/files/clamav-0.104.0-ncurses_detection.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From cd99490efb82b66c75e92fab3ff97c480bfc9cf9 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero@gentoo.org>
-Date: Sat, 16 Oct 2021 10:56:22 +0200
-Subject: [PATCH] Use all the link line from ncurses pkg-config
-
-Otherwise it would fail at link time if ncurses has a stand alone tinfo library.
----
- cmake/FindCURSES.cmake | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/cmake/FindCURSES.cmake b/cmake/FindCURSES.cmake
-index 35d4a570f6..528211c45c 100644
---- a/cmake/FindCURSES.cmake
-+++ b/cmake/FindCURSES.cmake
-@@ -58,11 +58,7 @@ if(NCURSES_NOT_FOUND EQUAL -1)
- set(HAVE_LIBNCURSES 1)
- set(CURSES_INCLUDE "<ncurses.h>")
-
-- find_library(CURSES_LIBRARY
-- NAMES ncurses
-- PATHS ${PC_NCurses_LIBRARY_DIRS}
-- )
--
-+ set(CURSES_LIBRARY ${PC_NCurses_LINK_LIBRARIES})
- set(CURSES_VERSION ${PC_NCurses_VERSION})
-
- include(FindPackageHandleStandardArgs)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2021-10-16 15:52 Thomas Raschbacher
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Raschbacher @ 2021-10-16 15:52 UTC (permalink / raw
To: gentoo-commits
commit: f870534c48c621c38128ea94e7aa55b5d6b8d782
Author: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 16 15:52:27 2021 +0000
Commit: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
CommitDate: Sat Oct 16 15:52:27 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f870534c
app-antivirus/clamav: fixed mode on .initd files
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Thomas Raschbacher <lordvan <AT> gentoo.org>
app-antivirus/clamav/files/clamav-milter.initd | 0
app-antivirus/clamav/files/clamd.initd | 0
app-antivirus/clamav/files/clamonacc.initd | 0
app-antivirus/clamav/files/freshclam.initd | 0
4 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-milter.initd b/app-antivirus/clamav/files/clamav-milter.initd
old mode 100755
new mode 100644
diff --git a/app-antivirus/clamav/files/clamd.initd b/app-antivirus/clamav/files/clamd.initd
old mode 100755
new mode 100644
diff --git a/app-antivirus/clamav/files/clamonacc.initd b/app-antivirus/clamav/files/clamonacc.initd
old mode 100755
new mode 100644
diff --git a/app-antivirus/clamav/files/freshclam.initd b/app-antivirus/clamav/files/freshclam.initd
old mode 100755
new mode 100644
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2021-10-05 23:58 Michael Orlitzky
0 siblings, 0 replies; 12+ messages in thread
From: Michael Orlitzky @ 2021-10-05 23:58 UTC (permalink / raw
To: gentoo-commits
commit: 4f85c9bb53beb9630e3c3c607f084484a924f1fc
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 5 22:23:19 2021 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Oct 5 23:57:02 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f85c9bb
app-antivirus/clamav: remove ununsed patches.
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
app-antivirus/clamav/files/clamav-milter.logrotate | 25 ----------------------
app-antivirus/clamav/files/clamav-milter.service | 12 -----------
app-antivirus/clamav/files/freshclamd.service | 13 -----------
3 files changed, 50 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-milter.logrotate b/app-antivirus/clamav/files/clamav-milter.logrotate
deleted file mode 100644
index 24782df604b..00000000000
--- a/app-antivirus/clamav/files/clamav-milter.logrotate
+++ /dev/null
@@ -1,25 +0,0 @@
-# This script is intended to rotate the logs for clamav-milter in its
-# default configuration on Gentoo, where clamav-milter writes to its
-# own log file but does not rotate that file itself. The clamav-milter
-# daemon is capable of rotating its own logs; if you have "LogRotate
-# yes" in clamav-milter.conf then you do not need this script (and
-# should disable it). Likewise, if you are logging to syslog
-# (LogSyslog yes), this is redundant.
-#
-# This is more complicated than the clamd/freshclam scripts because
-# the milter doesn't yet reopen its log files when it receives a
-# SIGHUP. See https://bugzilla.clamav.net/show_bug.cgi?id=12615
-# for that. Instead we have to attempt OpenRC/systemd service
-# restarts on (only) the machines that support them.
-/var/log/clamav/clamav-milter.log {
- su clamav clamav
- missingok
- postrotate
- if command -v rc-service 2>/dev/null; then
- rc-service clamav-milter status 2>/dev/null 1>&2 && rc-service clamav-milter restart 1>/dev/null
- fi
- if command -v systemctl 2>/dev/null; then
- systemctl try-restart clamav-milter
- fi
- endscript
-}
diff --git a/app-antivirus/clamav/files/clamav-milter.service b/app-antivirus/clamav/files/clamav-milter.service
deleted file mode 100644
index 5a1a24faa27..00000000000
--- a/app-antivirus/clamav/files/clamav-milter.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Milter module for the ClamAV scanner
-After=nss-lookup.target network.target
-Before=sendmail.service
-Before=postfix.service
-
-[Service]
-ExecStart=/usr/sbin/clamav-milter -c /etc/clamav-milter.conf --nofork=yes
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-antivirus/clamav/files/freshclamd.service b/app-antivirus/clamav/files/freshclamd.service
deleted file mode 100644
index 21487688066..00000000000
--- a/app-antivirus/clamav/files/freshclamd.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=clamav updater
-
-[Service]
-Type=forking
-User=clamav
-Group=clamav
-RuntimeDirectory=clamav
-PIDFile=/run/clamav/freshclam.pid
-ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid
-
-[Install]
-WantedBy=multi-user.target
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2021-04-19 19:06 Michael Orlitzky
0 siblings, 0 replies; 12+ messages in thread
From: Michael Orlitzky @ 2021-04-19 19:06 UTC (permalink / raw
To: gentoo-commits
commit: ceecd2ec7861ba9c0d1b8623cf53018589ff8341
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Mon Apr 19 17:20:13 2021 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Apr 19 18:56:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceecd2ec
app-antivirus/clamav: remove unused patches/files
Closes: https://github.com/gentoo/gentoo/pull/20459
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
.../clamav/files/clamav-0.101.2-tinfo.patch | 31 -----
.../files/clamav-0.102.3-system-tomsfastmath.patch | 113 ------------------
app-antivirus/clamav/files/clamav.logrotate | 17 ---
app-antivirus/clamav/files/clamd.conf | 9 --
app-antivirus/clamav/files/clamd.conf-r1 | 7 --
app-antivirus/clamav/files/clamd.initd-r6 | 128 ---------------------
6 files changed, 305 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch
deleted file mode 100644
index 66130be4188..00000000000
--- a/app-antivirus/clamav/files/clamav-0.101.2-tinfo.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-https://bugs.gentoo.org/670729
-
---- a/m4/reorganization/clamdtop.m4
-+++ b/m4/reorganization/clamdtop.m4
-@@ -4,12 +4,26 @@
-
- if test "$enable_clamdtop" != "no"; then
-
-+PKG_CHECK_MODULES([CURSES], [ncursesw],
-+ [CURSES_INCLUDE="<ncurses.h>";
-+ HAVE_LIBNCURSES=yes],
-+ HAVE_LIBNCURSES=no])
-+
-+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
-+PKG_CHECK_MODULES([CURSES], [ncurses],
-+ [CURSES_INCLUDE="<ncurses.h>";
-+ HAVE_LIBNCURSES=yes],
-+ HAVE_LIBNCURSES=no])
-+fi
-+
-+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
- AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
- AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
- [initscr(); KEY_RESIZE;]),
- [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
- CURSES_INCLUDE="<ncurses/ncurses.h>"],
- [])
-+fi
-
- if test "X$HAVE_LIBNCURSES" != "Xyes"; then
- HAVE_LIBNCURSES=
diff --git a/app-antivirus/clamav/files/clamav-0.102.3-system-tomsfastmath.patch b/app-antivirus/clamav/files/clamav-0.102.3-system-tomsfastmath.patch
deleted file mode 100644
index ee575c3b128..00000000000
--- a/app-antivirus/clamav/files/clamav-0.102.3-system-tomsfastmath.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From bcf63fa6bbd519bc61c2b2553fb1913f802eb96e Mon Sep 17 00:00:00 2001
-From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-Date: Wed, 11 Mar 2015 20:03:15 +0100
-Subject: add support for system tomsfastmath
-
-Patch-Name: add-support-for-system-tomsfastmath.patch
----
- configure.ac | 2 ++
- libclamav/Makefile.am | 10 ++++++++--
- libclamav/bignum.h | 6 +++++-
- libclamav/xdp.c | 2 +-
- m4/reorganization/libs/tomsfastmath.m4 | 12 ++++++++++++
- 5 files changed, 28 insertions(+), 4 deletions(-)
- create mode 100644 m4/reorganization/libs/tomsfastmath.m4
-
-diff --git a/configure.ac b/configure.ac
-index 8375971..3cacfb8 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -98,6 +98,7 @@ m4_include([m4/reorganization/libs/libmspack.m4])
- if test "x$use_internal_mspack" = "xno"; then
- mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS"
- fi
-+m4_include([m4/reorganization/libs/tomsfastmath.m4])
-
- AM_MAINTAINER_MODE
- m4_include([m4/reorganization/libs/libz.m4])
-@@ -356,6 +357,7 @@ fi
- CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara])
- CL_MSG_STATUS([fts ],[yes],[$lfs_fts_msg])
-
-+CL_MSG_STATUS([tomsfastmath],[yes],[$tomsfastmath_msg])
-
- # Yep, downgrading the compiler avoids the bug too:
- # 4.0.x, and 4.1.0 are the known buggy versions
-diff --git a/libclamav/Makefile.am b/libclamav/Makefile.am
-index 699d033..3282272 100644
---- a/libclamav/Makefile.am
-+++ b/libclamav/Makefile.am
-@@ -602,8 +602,10 @@ libclamav_la_SOURCES += yara_arena.c \
- yara_clam.h
- endif
-
--libclamav_la_SOURCES += bignum.h\
-- bignum_fast.h\
-+libclamav_la_SOURCES += bignum.h
-+
-+if !SYSTEM_TOMSFASTMATH
-+libclamav_la_SOURCES += bignum_fast.h\
- tomsfastmath/addsub/fp_add.c\
- tomsfastmath/addsub/fp_add_d.c\
- tomsfastmath/addsub/fp_addmod.c\
-@@ -685,6 +687,10 @@ libclamav_la_SOURCES += bignum.h\
- tomsfastmath/sqr/fp_sqr_comba_generic.c\
- tomsfastmath/sqr/fp_sqr_comba_small_set.c\
- tomsfastmath/sqr/fp_sqrmod.c
-+else
-+libclamav_la_CFLAGS += $(TOMSFASTMATH_CFLAGS)
-+libclamav_la_LIBADD += $(TOMSFASTMATH_LIBS)
-+endif
-
- .PHONY2: version.h.tmp
- version.c: version.h
-diff --git a/libclamav/bignum.h b/libclamav/bignum.h
-index 8fdc956..56dfa95 100644
---- a/libclamav/bignum.h
-+++ b/libclamav/bignum.h
-@@ -1,9 +1,13 @@
- #ifndef BIGNUM_H_
- #define BIGNUM_H_
-
-+#if HAVE_SYSTEM_TOMSFASTMATH
-+#include <tfm.h>
-+#else
- #define TFM_CHECK
--
- #include "bignum_fast.h"
-+#endif
-+
- typedef fp_int mp_int;
- #define mp_cmp fp_cmp
- #define mp_toradix_n(a, b, c, d) fp_toradix_n(a, b, c, d)
-diff --git a/libclamav/xdp.c b/libclamav/xdp.c
-index d5a4c4b..cc3b40d 100644
---- a/libclamav/xdp.c
-+++ b/libclamav/xdp.c
-@@ -52,7 +52,7 @@
- #include "scanners.h"
- #include "conv.h"
- #include "xdp.h"
--#include "bignum_fast.h"
-+#include "bignum.h"
- #include "filetypes.h"
-
- static char *dump_xdp(cli_ctx *ctx, const char *start, size_t sz);
-diff --git a/m4/reorganization/libs/tomsfastmath.m4 b/m4/reorganization/libs/tomsfastmath.m4
-new file mode 100644
-index 0000000..2a821a1
---- /dev/null
-+++ b/m4/reorganization/libs/tomsfastmath.m4
-@@ -0,0 +1,12 @@
-+dnl Check for system tomsfastmath
-+PKG_CHECK_MODULES([TOMSFASTMATH], [tomsfastmath], [have_system_tomsfastmath=yes], [have_system_tomsfastmath=no])
-+
-+AM_CONDITIONAL([SYSTEM_TOMSFASTMATH], [test "x$have_system_tomsfastmath" = "xyes"])
-+
-+if test "x$have_system_tomsfastmath" = "xyes"; then
-+ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [1], [link against system-wide tomsfastmath library])
-+ tomsfastmath_msg="External, $TOMSFASTMATH_CFLAGS $TOMSFASTMATH_LIBS"
-+else
-+ AC_DEFINE([HAVE_SYSTEM_TOMSFASTMATH], [0], [don't link against system-wide tomsfastmath library])
-+ tomsfastmath_msg="Internal"
-+fi
diff --git a/app-antivirus/clamav/files/clamav.logrotate b/app-antivirus/clamav/files/clamav.logrotate
deleted file mode 100644
index 7a811264653..00000000000
--- a/app-antivirus/clamav/files/clamav.logrotate
+++ /dev/null
@@ -1,17 +0,0 @@
-/var/log/clamav/clamd.log {
- su clamav clamav
- missingok
- postrotate
- /etc/init.d/clamd logfix
- /bin/kill -HUP `cat /var/run/clamav/clamd.pid 2> /dev/null` 2>/dev/null || true
- endscript
-}
-
-/var/log/clamav/freshclam.log {
- su clamav clamav
- missingok
- postrotate
- /etc/init.d/clamd logfix
- /bin/kill -HUP `cat /var/run/clamav/freshclam.pid 2> /dev/null` 2>/dev/null || true
- endscript
-}
diff --git a/app-antivirus/clamav/files/clamd.conf b/app-antivirus/clamav/files/clamd.conf
deleted file mode 100644
index ee055138074..00000000000
--- a/app-antivirus/clamav/files/clamd.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-# Config file for /etc/init.d/clamd
-
-# NOTICE: Since clamav-0.85-r1, only START_CLAMD and START_FRESHCLAM settings
-# are used, other are silently ignored
-
-START_CLAMD=yes
-START_FRESHCLAM=yes
-CLAMD_NICELEVEL=3
-FRESHCLAM_NICELEVEL=19
diff --git a/app-antivirus/clamav/files/clamd.conf-r1 b/app-antivirus/clamav/files/clamd.conf-r1
deleted file mode 100644
index de95554eea7..00000000000
--- a/app-antivirus/clamav/files/clamd.conf-r1
+++ /dev/null
@@ -1,7 +0,0 @@
-# Config file for /etc/init.d/clamd
-
-START_CLAMD=yes
-START_FRESHCLAM=yes
-CLAMD_NICELEVEL=3
-FRESHCLAM_NICELEVEL=19
-IONICE_LEVEL=2
diff --git a/app-antivirus/clamav/files/clamd.initd-r6 b/app-antivirus/clamav/files/clamd.initd-r6
deleted file mode 100644
index 8cf8dd0a4ba..00000000000
--- a/app-antivirus/clamav/files/clamd.initd-r6
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-daemon_clamd="/usr/sbin/clamd"
-daemon_freshclam="/usr/bin/freshclam"
-daemon_milter="/usr/sbin/clamav-milter"
-
-extra_commands="logfix"
-
-depend() {
- use net
- provide antivirus
-}
-
-get_config() {
- clamconf | sed 's/["=]//g' | \
- awk "{
- if(\$0==\"Config file: $1.conf\") S=1
- if(S==1&&\$0==\"\") {
- print \"$3\"
- exit
- }
- if(S==1&&\$1~\"^$2\$\") {
- print \$2!=\"disabled\"?\$2:\"$3\"
- exit
- }
- }"
-}
-
-start() {
- # populate variables and fix log file permissions
- logfix
-
- if [ "${START_CLAMD}" = "yes" ]; then
- checkpath --quiet --mode 755 \
- --owner "${clamd_user}":"${clamd_user}" \
- --directory `dirname ${clamd_socket}`
- if [ -S "${clamd_socket}" ]; then
- rm -f ${clamd_socket}
- fi
- ebegin "Starting clamd"
- start-stop-daemon --start --quiet \
- --nicelevel ${CLAMD_NICELEVEL:-0} \
- --ionice ${IONICE_LEVEL:-0} \
- --exec ${daemon_clamd}
- eend $? "Failed to start clamd"
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- checkpath --quiet --mode 755 \
- --owner "${clamd_user}":"${clamd_user}" \
- --directory `dirname ${clamd_socket}`
- ebegin "Starting freshclam"
- start-stop-daemon --start --quiet \
- --nicelevel ${FRESHCLAM_NICELEVEL:-0} \
- --ionice ${IONICE_LEVEL:-0} \
- --exec ${daemon_freshclam} -- -d
- retcode=$?
- if [ ${retcode} = 1 ]; then
- eend 0
- einfo "Virus databases are already up to date."
- else
- eend ${retcode} "Failed to start freshclam"
- fi
- fi
-
- if [ "${START_MILTER}" = "yes" ]; then
- if [ -z "${MILTER_CONF_FILE}" ]; then
- MILTER_CONF_FILE="/etc/clamav-milter.conf"
- fi
-
- ebegin "Starting clamav-milter"
- start-stop-daemon --start --quiet \
- --nicelevel ${MILTER_NICELEVEL:-0} \
- --ionice ${IONICE_LEVEL:-0} \
- --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
- eend $? "Failed to start clamav-milter"
- fi
-}
-
-stop() {
- if [ "${START_CLAMD}" = "yes" ]; then
- ebegin "Stopping clamd"
- start-stop-daemon --stop --quiet --name clamd
- eend $? "Failed to stop clamd"
- fi
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- ebegin "Stopping freshclam"
- start-stop-daemon --stop --quiet --name freshclam
- eend $? "Failed to stop freshclam"
- fi
- if [ "${START_MILTER}" = "yes" ]; then
- ebegin "Stopping clamav-milter"
- start-stop-daemon --stop --quiet --name clamav-milter
- eend $? "Failed to stop clamav-milter"
- fi
-}
-
-logfix() {
- clamd_socket=$(get_config clamd LocalSocket /run/clamav/clamd.sock)
- clamd_user=$(get_config clamd User clamav)
- freshclam_user=$(get_config freshclam DatabaseOwner clamav)
-
- if [ "${START_CLAMD}" = "yes" ]; then
- # fix clamd log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config clamd LogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${clamd_user}":"${clamd_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- # fix freshclam log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config freshclam UpdateLogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${freshclam_user}":"${freshclam_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-}
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2020-09-23 3:34 Michael Orlitzky
0 siblings, 0 replies; 12+ messages in thread
From: Michael Orlitzky @ 2020-09-23 3:34 UTC (permalink / raw
To: gentoo-commits
commit: aeb262aebac36022b684fbd066218dc2666989cc
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 23 02:11:36 2020 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Sep 23 03:23:25 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aeb262ae
app-antivirus/clamav: make clamonacc OpenRC service depend on clamd.
The clamonacc on-access scanner service will just crash if clamd isn't
available. This commit rerolls the upstream OpenRC patch to contain
the new dependency.
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
.../files/clamav-0.103.0-upstream-openrc.patch | 32 ++++++++--------------
1 file changed, 12 insertions(+), 20 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.103.0-upstream-openrc.patch b/app-antivirus/clamav/files/clamav-0.103.0-upstream-openrc.patch
index 909c965afbe..a7676f0ab82 100644
--- a/app-antivirus/clamav/files/clamav-0.103.0-upstream-openrc.patch
+++ b/app-antivirus/clamav/files/clamav-0.103.0-upstream-openrc.patch
@@ -20,20 +20,6 @@ index 12e7fcc28..a3c47e23a 100644
lcov:
($(MAKE); cd unit_tests; $(MAKE) lcov)
quick-check:
-diff --git a/clamav-config.h.in b/clamav-config.h.in
-index d7aff4a3b..ebd8ac256 100644
---- a/clamav-config.h.in
-+++ b/clamav-config.h.in
-@@ -402,6 +402,9 @@
- /* Use private fts() implementation which is LFS safe */
- #undef HAVE_SYSTEM_LFS_FTS
-
-+/* don't link against system-wide tomsfastmath library */
-+#undef HAVE_SYSTEM_TOMSFASTMATH
-+
- /* Define to 1 if you have the <sys/cdefs.h> header file. */
- #undef HAVE_SYS_CDEFS_H
-
diff --git a/clamav-milter/Makefile.am b/clamav-milter/Makefile.am
index 1ec4afff6..c75c2b4a3 100644
--- a/clamav-milter/Makefile.am
@@ -207,10 +193,10 @@ index 181e22056..864a7fc2a 100644
diff --git a/clamonacc/openrc/clamonacc.in.in b/clamonacc/openrc/clamonacc.in.in
new file mode 100644
-index 000000000..64acf5d83
+index 000000000..844cd49dd
--- /dev/null
+++ b/clamonacc/openrc/clamonacc.in.in
-@@ -0,0 +1,12 @@
+@@ -0,0 +1,18 @@
+#!/sbin/openrc-run
+
+command="@SBINDIR@/clamonacc"
@@ -223,8 +209,14 @@ index 000000000..64acf5d83
+#
+command_args="--foreground"
+command_background=true
++
++depend() {
++ # Unlike the milter, the on-access scanner will simply fail to start
++ # until clamd is available.
++ need clamd
++}
diff --git a/configure.ac b/configure.ac
-index 461342621..773787e49 100644
+index 7b2a777d4..8e0e810f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,6 +79,12 @@ if test "$enable_experimental" = "yes"; then
@@ -240,7 +232,7 @@ index 461342621..773787e49 100644
build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'`
AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
-@@ -105,6 +111,7 @@ m4_include([m4/reorganization/libs/libz.m4])
+@@ -104,6 +110,7 @@ m4_include([m4/reorganization/libs/libz.m4])
m4_include([m4/reorganization/libs/bzip.m4])
m4_include([m4/reorganization/libs/unrar.m4])
m4_include([m4/reorganization/libs/systemd.m4])
@@ -248,7 +240,7 @@ index 461342621..773787e49 100644
m4_include([m4/reorganization/code_checks/ipv6.m4])
m4_include([m4/reorganization/code_checks/dns.m4])
m4_include([m4/reorganization/code_checks/fanotify.m4])
-@@ -193,7 +200,10 @@ AC_CONFIG_FILES([
+@@ -192,7 +199,10 @@ AC_CONFIG_FILES([
libclamav.pc
platform.h
clamav-types.h
@@ -260,7 +252,7 @@ index 461342621..773787e49 100644
if test "x$enable_libclamav_only" != "xyes"; then
AC_CONFIG_FILES([
clamscan/Makefile
-@@ -203,10 +213,14 @@ if test "x$enable_libclamav_only" != "xyes"; then
+@@ -202,10 +212,14 @@ if test "x$enable_libclamav_only" != "xyes"; then
clamd/Makefile
clamd/clamav-daemon.service
clamd/clamav-daemon.socket
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2019-04-04 21:16 Aaron Bauman
0 siblings, 0 replies; 12+ messages in thread
From: Aaron Bauman @ 2019-04-04 21:16 UTC (permalink / raw
To: gentoo-commits
commit: fe10283cbc9f679fb5c2f4f7c69016a3b259926f
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sat Mar 30 15:42:50 2019 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Thu Apr 4 21:16:24 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe10283c
app-antivirus/clamav: remove unused patches
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11547
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
.../files/clamav-0.99.4-fix-newer-zlib.patch | 54 ----------------------
.../clamav-0.99.4-pcre2-compile-erroffset.patch | 11 -----
2 files changed, 65 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.99.4-fix-newer-zlib.patch b/app-antivirus/clamav/files/clamav-0.99.4-fix-newer-zlib.patch
deleted file mode 100644
index 18673419a58..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.4-fix-newer-zlib.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-https://bugs.gentoo.org/649516
-
-Description: fix compatibility with zlib 1.2.9 and newer
-Author: Marc Deslauriers <marc.deslauriers@canonical.com>
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073
-
-Index: clamav-0.99.2+dfsg/libclamav/bytecode_api.c
-===================================================================
---- clamav-0.99.2+dfsg.orig/libclamav/bytecode_api.c 2017-08-08 15:20:06.651685637 -0400
-+++ clamav-0.99.2+dfsg/libclamav/bytecode_api.c 2017-08-15 15:45:14.645714766 -0400
-@@ -811,8 +811,20 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n");
- return -1;
- }
-- memset(&stream, 0, sizeof(stream));
-- ret = inflateInit2(&stream, windowBits);
-+
-+ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-+ if (!b) {
-+ return -1;
-+ }
-+ ctx->inflates = b;
-+ ctx->ninflates = n;
-+ b = &b[n-1];
-+
-+ b->from = from;
-+ b->to = to;
-+ b->needSync = 0;
-+ memset(&b->stream, 0, sizeof(stream));
-+ ret = inflateInit2(&b->stream, windowBits);
- switch (ret) {
- case Z_MEM_ERROR:
- cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n");
-@@ -829,20 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret);
- return -1;
- }
--
-- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-- if (!b) {
-- inflateEnd(&stream);
-- return -1;
-- }
-- ctx->inflates = b;
-- ctx->ninflates = n;
-- b = &b[n-1];
--
-- b->from = from;
-- b->to = to;
-- b->needSync = 0;
-- memcpy(&b->stream, &stream, sizeof(stream));
- return n-1;
- }
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.4-pcre2-compile-erroffset.patch b/app-antivirus/clamav/files/clamav-0.99.4-pcre2-compile-erroffset.patch
deleted file mode 100644
index 5585ea61453..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.4-pcre2-compile-erroffset.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- clamav-0.99.4/libclamav/regex_pcre.c_orig 2018-03-02 19:10:39.702899702 +0100
-+++ clamav-0.99.4/libclamav/regex_pcre.c 2018-03-02 19:09:27.600901912 +0100
-@@ -112,7 +112,8 @@
- #if USING_PCRE2
- int cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override)
- {
-- int errornum, erroffset;
-+ int errornum;
-+ size_t erroffset;
- pcre2_general_context *gctx;
- pcre2_compile_context *cctx;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2018-10-07 18:21 Thomas Raschbacher
0 siblings, 0 replies; 12+ messages in thread
From: Thomas Raschbacher @ 2018-10-07 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 3a8dd8fcdef8b3a4a41af84b7b35a1a439e56ad7
Author: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 7 18:20:58 2018 +0000
Commit: Thomas Raschbacher <lordvan <AT> gentoo <DOT> org>
CommitDate: Sun Oct 7 18:20:58 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a8dd8fc
app-antivirus/clamav: fix freshclamd.service
Fix for freschclamd systemd file.
Thanks to Shaun for the patch and floppym for checking.
Closes https://bugs.gentoo.org/592668
Signed-off-by: Thomas Raschbacher <lordvan <AT> gentoo.org>
Package-Manager: Portage-2.3.50, Repoman-2.3.11
app-antivirus/clamav/files/freshclamd.service | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app-antivirus/clamav/files/freshclamd.service b/app-antivirus/clamav/files/freshclamd.service
index a0a72c2e60e..21487688066 100644
--- a/app-antivirus/clamav/files/freshclamd.service
+++ b/app-antivirus/clamav/files/freshclamd.service
@@ -3,6 +3,9 @@ Description=clamav updater
[Service]
Type=forking
+User=clamav
+Group=clamav
+RuntimeDirectory=clamav
PIDFile=/run/clamav/freshclam.pid
ExecStart=/usr/bin/freshclam -d -p /run/clamav/freshclam.pid
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2018-05-27 16:11 Aaron Bauman
0 siblings, 0 replies; 12+ messages in thread
From: Aaron Bauman @ 2018-05-27 16:11 UTC (permalink / raw
To: gentoo-commits
commit: b706131c0f3184e53e71a7f787ac28385d12526c
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Sun May 27 11:57:09 2018 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sun May 27 16:09:21 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b706131c
app-antivirus/clamav: remove unused patches
Closes: https://github.com/gentoo/gentoo/pull/8607
app-antivirus/clamav/files/clamav-0.99-zlib.patch | 22 ---
.../clamav/files/clamav-0.99.2-bytecode_api.patch | 50 ------
.../clamav/files/clamav-0.99.2-gcc-6.patch | 84 ----------
.../clamav-0.99.2-pcre2-compile-erroffset.patch | 12 --
.../clamav/files/clamav-0.99.2-tinfo.patch | 23 ---
...lamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch | 186 ---------------------
...mav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch | 132 ---------------
7 files changed, 509 deletions(-)
diff --git a/app-antivirus/clamav/files/clamav-0.99-zlib.patch b/app-antivirus/clamav/files/clamav-0.99-zlib.patch
deleted file mode 100644
index 8d1f4e61537..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99-zlib.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-commit f0bcd186190fe6e67b3f0eaaceb7a99aa6a98865
-Author: Steven Morgan <stevmorg@cisco.com>
-Date: Thu Jan 5 12:30:35 2017 -0500
-
- bb111711 - fix zlib version check - patch by Daniel J. Luke.
-
-diff --git a/m4/reorganization/libs/libz.m4 b/m4/reorganization/libs/libz.m4
-index b5c7414..f7b67ca 100644
---- a/m4/reorganization/libs/libz.m4
-+++ b/m4/reorganization/libs/libz.m4
-@@ -29,9 +29,9 @@ then
- AC_MSG_ERROR([Please install zlib and zlib-devel packages])
- else
-
-- vuln=`grep "ZLIB_VERSION \"1.2.0" $ZLIB_HOME/include/zlib.h`
-+ vuln=`grep "ZLIB_VERSION \"1.2.0\"" $ZLIB_HOME/include/zlib.h`
- if test -z "$vuln"; then
-- vuln=`grep "ZLIB_VERSION \"1.2.1" $ZLIB_HOME/include/zlib.h`
-+ vuln=`grep "ZLIB_VERSION \"1.2.1\"" $ZLIB_HOME/include/zlib.h`
- fi
-
- if test -n "$vuln"; then
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch b/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch
deleted file mode 100644
index d6cd5264ed7..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Description: fix compatibility with zlib 1.2.9 and newer
-Author: Marc Deslauriers <marc.deslauriers@canonical.com>
-Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073
-
---- a/libclamav/bytecode_api.c 2017-08-08 15:20:06.651685637 -0400
-+++ b/libclamav/bytecode_api.c 2017-08-15 15:45:14.645714766 -0400
-@@ -811,8 +811,20 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n");
- return -1;
- }
-- memset(&stream, 0, sizeof(stream));
-- ret = inflateInit2(&stream, windowBits);
-+
-+ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-+ if (!b) {
-+ return -1;
-+ }
-+ ctx->inflates = b;
-+ ctx->ninflates = n;
-+ b = &b[n-1];
-+
-+ b->from = from;
-+ b->to = to;
-+ b->needSync = 0;
-+ memset(&b->stream, 0, sizeof(stream));
-+ ret = inflateInit2(&b->stream, windowBits);
- switch (ret) {
- case Z_MEM_ERROR:
- cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n");
-@@ -829,20 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cl
- cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret);
- return -1;
- }
--
-- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n);
-- if (!b) {
-- inflateEnd(&stream);
-- return -1;
-- }
-- ctx->inflates = b;
-- ctx->ninflates = n;
-- b = &b[n-1];
--
-- b->from = from;
-- b->to = to;
-- b->needSync = 0;
-- memcpy(&b->stream, &stream, sizeof(stream));
- return n-1;
- }
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch b/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
deleted file mode 100644
index 2031edbd382..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-gcc-6.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff --git a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-index 59ff6aa..1325394 100644
---- a/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-+++ b/libclamav/c++/llvm/include/llvm/ADT/StringMap.h
-@@ -169,3 +169,3 @@ public:
- KeyLength+1;
-- unsigned Alignment = alignof<StringMapEntry>();
-+ unsigned Alignment = alignOf<StringMapEntry>();
-
-diff --git a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-index 88044c7..86b0f40 100644
---- a/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-+++ b/libclamav/c++/llvm/include/llvm/CodeGen/SlotIndexes.h
-@@ -417,3 +417,3 @@ namespace llvm {
- ileAllocator.Allocate(sizeof(IndexListEntry),
-- alignof<IndexListEntry>()));
-+ alignOf<IndexListEntry>()));
-
-diff --git a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-index 6a7a1a6..979e597 100644
---- a/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-+++ b/libclamav/c++/llvm/include/llvm/Support/AlignOf.h
-@@ -51,8 +51,8 @@ struct AlignOf {
-
--/// alignof - A templated function that returns the mininum alignment of
-+/// alignOf - A templated function that returns the mininum alignment of
- /// of a type. This provides no extra functionality beyond the AlignOf
- /// class besides some cosmetic cleanliness. Example usage:
--/// alignof<int>() returns the alignment of an int.
-+/// alignOf<int>() returns the alignment of an int.
- template <typename T>
--static inline unsigned alignof() { return AlignOf<T>::Alignment; }
-+static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
-
-diff --git a/libclamav/c++/llvm/include/llvm/Support/Allocator.h b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-index 4a7251f..17caf5e 100644
---- a/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-+++ b/libclamav/c++/llvm/include/llvm/Support/Allocator.h
-@@ -203,3 +203,3 @@ public:
- for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
-- Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
-+ Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
- if (Ptr + sizeof(T) <= End)
-diff --git a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-index b892d85..dc72346 100644
---- a/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-+++ b/libclamav/c++/llvm/lib/Analysis/ScalarEvolution.cpp
-@@ -495,3 +495,3 @@ void SCEVUnknown::print(raw_ostream &OS) const {
- if (isAlignOf(AllocTy)) {
-- OS << "alignof(" << *AllocTy << ")";
-+ OS << "alignOf(" << *AllocTy << ")";
- return;
-diff --git a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-index 824021c..757ca50 100644
---- a/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-+++ b/libclamav/c++/llvm/lib/Target/X86/X86CodeEmitter.cpp
-@@ -569,3 +569,3 @@ void Emitter<CodeEmitter>::emitMemModRMByte(const MachineInstr &MI,
- // Calculate what the SS field value should be...
-- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
-+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
- unsigned SS = SSTable[Scale.getImm()];
-diff --git a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-index 9564fe0..b2b7986 100644
---- a/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-+++ b/libclamav/c++/llvm/lib/Target/X86/X86MCCodeEmitter.cpp
-@@ -332,3 +332,3 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
- // Calculate what the SS field value should be...
-- static const unsigned SSTable[] = { ~0, 0, 1, ~0, 2, ~0, ~0, ~0, 3 };
-+ static const unsigned SSTable[] = { ~0u, 0u, 1u, ~0u, 2u, ~0u, ~0u, ~0u, 3u };
- unsigned SS = SSTable[Scale.getImm()];
-diff --git a/libclamav/mpool.c b/libclamav/mpool.c
-index cd38e15..b5e537d 100644
---- a/libclamav/mpool.c
-+++ b/libclamav/mpool.c
-@@ -417,3 +417,3 @@ static size_t from_bits(unsigned int bits) {
-
--static inline unsigned int alignof(size_t size)
-+static inline unsigned int alignOf(size_t size)
- {
-@@ -609,3 +609,3 @@ static void* allocate_aligned(struct MPMAP *mpm, size_t size, unsigned align, co
- void *mpool_malloc(struct MP *mp, size_t size) {
-- size_t align = alignof(size);
-+ size_t align = alignOf(size);
- size_t i, needed = align_increase(size+FRAG_OVERHEAD, align);
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch b/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
deleted file mode 100644
index 1ee55171afb..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-pcre2-compile-erroffset.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- clamav-0.99.2/libclamav/regex_pcre.c~ 2017-11-28 14:40:56.484208243 +0100
-+++ clamav-0.99.2/libclamav/regex_pcre.c 2017-11-28 14:41:07.301207800 +0100
-@@ -112,7 +112,8 @@ int cli_pcre_addoptions(struct cli_pcre_
- #if USING_PCRE2
- int cli_pcre_compile(struct cli_pcre_data *pd, long long unsigned match_limit, long long unsigned match_limit_recursion, unsigned int options, int opt_override)
- {
-- int errornum, erroffset;
-+ int errornum;
-+ size_t erroffset;
- pcre2_general_context *gctx;
- pcre2_compile_context *cctx;
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch b/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
deleted file mode 100644
index 4593d16836e..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.2-tinfo.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/m4/reorganization/clamdtop.m4
-+++ b/m4/reorganization/clamdtop.m4
-@@ -4,12 +4,20 @@
-
- if test "$enable_clamdtop" != "no"; then
-
-+PKG_CHECK_MODULES([CURSES],[ncurses],
-+ [HAVE_LIBNCURSES=yes; CURSES_INCLUDE="<ncurses.h>"],
-+ [HAVE_LIBNCURSES=no],
-+)
-+
-+if test "X$HAVE_LIBNCURSES" != "Xyes"; then
-+ HAVE_LIBNCURSES=
- AC_LIB_FIND([ncurses], [ncurses/ncurses.h],
- AC_LANG_PROGRAM([#include <ncurses/ncurses.h>],
- [initscr(); KEY_RESIZE;]),
- [CURSES_CPPFLAGS="$INCNCURSES"; CURSES_LIBS="$LTLIBNCURSES";
- CURSES_INCLUDE="<ncurses/ncurses.h>"],
- [])
-+fi
-
- if test "X$HAVE_LIBNCURSES" != "Xyes"; then
- HAVE_LIBNCURSES=
diff --git a/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch b/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch
deleted file mode 100644
index 90facf6eae0..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.3-VMSF_DELTA-fix-CVE-2012-6706.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-Apply proposed changes to fix RAR VMSF_DELTA Filter Signedness error (CVE-2012-6706)
-
-Cherry picked from commit a7d8447bd9a4d5ae1fa970c1849c8caeb5f1a805 [Link 1] and
-d4699442bce76574573dc564e7f2177d679b88bd [Link 2].
-
-Link 1: https://github.com/Cisco-Talos/clamav-devel/commit/a7d8447bd9a4d5ae1fa970c1849c8caeb5f1a805
-Link 2: https://github.com/Cisco-Talos/clamav-devel/commit/d4699442bce76574573dc564e7f2177d679b88bd
-
---- a/libclamunrar/unrarvm.c
-+++ b/libclamunrar/unrarvm.c
-@@ -213,17 +213,20 @@ void rarvm_addbits(rarvm_input_t *rarvm_input, int bits)
-
- unsigned int rarvm_getbits(rarvm_input_t *rarvm_input)
- {
-- unsigned int bit_field;
-+ unsigned int bit_field = 0;
-
-- if (rarvm_input->in_addr+2 < rarvm_input->buf_size) {
-+ if (rarvm_input->in_addr < rarvm_input->buf_size) {
- bit_field = (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr] << 16;
-- bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+1] << 8;
-- bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+2];
-- bit_field >>= (8-rarvm_input->in_bit);
--
-- return (bit_field & 0xffff);
-+ if (rarvm_input->in_addr+1 < rarvm_input->buf_size) {
-+ bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+1] << 8;
-+ if (rarvm_input->in_addr+2 < rarvm_input->buf_size) {
-+ bit_field |= (unsigned int) rarvm_input->in_buf[rarvm_input->in_addr+2];
-+ }
-+ }
- }
-- return 0;
-+ bit_field >>= (8-rarvm_input->in_bit);
-+
-+ return (bit_field & 0xffff);
- }
-
- unsigned int rarvm_read_data(rarvm_input_t *rarvm_input)
-@@ -311,10 +314,10 @@ static unsigned int *rarvm_get_operand(rarvm_data_t *rarvm_data,
- }
- }
-
--static unsigned int filter_itanium_getbits(unsigned char *data, int bit_pos, int bit_count)
-+static unsigned int filter_itanium_getbits(unsigned char *data, unsigned int bit_pos, unsigned int bit_count)
- {
-- int in_addr=bit_pos/8;
-- int in_bit=bit_pos&7;
-+ unsigned int in_addr=bit_pos/8;
-+ unsigned int in_bit=bit_pos&7;
- unsigned int bit_field=(unsigned int)data[in_addr++];
- bit_field|=(unsigned int)data[in_addr++] << 8;
- bit_field|=(unsigned int)data[in_addr++] << 16;
-@@ -323,10 +326,10 @@ static unsigned int filter_itanium_getbits(unsigned char *data, int bit_pos, int
- return(bit_field & (0xffffffff>>(32-bit_count)));
- }
-
--static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field, int bit_pos, int bit_count)
-+static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field, unsigned int bit_pos, unsigned int bit_count)
- {
-- int i, in_addr=bit_pos/8;
-- int in_bit=bit_pos&7;
-+ unsigned int i, in_addr=bit_pos/8;
-+ unsigned int in_bit=bit_pos&7;
- unsigned int and_mask=0xffffffff>>(32-bit_count);
- and_mask=~(and_mask<<in_bit);
-
-@@ -343,11 +346,12 @@ static void filter_itanium_setbits(unsigned char *data, unsigned int bit_field,
- static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_filters_t filter_type)
- {
- unsigned char *data, cmp_byte2, cur_byte, *src_data, *dest_data;
-- int i, j, data_size, channels, src_pos, dest_pos, border, width, PosR;
-- int op_type, cur_channel, byte_count, start_pos, pa, pb, pc;
-+ unsigned int i, j, data_size, channels, src_pos, dest_pos, border, width, PosR;
-+ unsigned int op_type, cur_channel, byte_count, start_pos;
-+ int pa, pb, pc;
- unsigned int file_offset, cur_pos, predicted;
-- int32_t offset, addr;
-- const int file_size=0x1000000;
-+ uint32_t offset, addr;
-+ const unsigned int file_size=0x1000000;
-
- switch(filter_type) {
- case VMSF_E8:
-@@ -356,7 +360,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- file_offset = rarvm_data->R[6];
-
-- if (((unsigned int)data_size >= VM_GLOBALMEMADDR) || (data_size < 4)) {
-+ if ((data_size > VM_GLOBALMEMADDR) || (data_size < 4)) {
- break;
- }
-
-@@ -367,12 +371,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- if (cur_byte==0xe8 || cur_byte==cmp_byte2) {
- offset = cur_pos+file_offset;
- addr = GET_VALUE(FALSE, data);
-- if (addr < 0) {
-- if (addr+offset >=0 ) {
-+ // We check 0x80000000 bit instead of '< 0' comparison
-+ // not assuming int32 presence or uint size and endianness.
-+ if ((addr & 0x80000000)!=0) { // addr<0
-+ if (((addr+offset) & 0x80000000)==0) { // addr+offset>=0
- SET_VALUE(FALSE, data, addr+file_size);
- }
- } else {
-- if (addr<file_size) {
-+ if (((addr-file_size) & 0x80000000)!=0) { // addr<file_size
- SET_VALUE(FALSE, data, addr-offset);
- }
- }
-@@ -386,7 +392,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- file_offset = rarvm_data->R[6];
-
-- if (((unsigned int)data_size >= VM_GLOBALMEMADDR) || (data_size < 21)) {
-+ if ((data_size > VM_GLOBALMEMADDR) || (data_size < 21)) {
- break;
- }
-
-@@ -429,7 +435,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- border = data_size*2;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2 || channels > 1024 || channels == 0) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels ; cur_channel++) {
-@@ -440,7 +446,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- }
- break;
- case VMSF_RGB: {
-- const int channels=3;
-+ const unsigned int channels=3;
- data_size = rarvm_data->R[4];
- width = rarvm_data->R[0] - 3;
- PosR = rarvm_data->R[1];
-@@ -448,15 +454,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- dest_data = src_data + data_size;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2 || data_size < 3 || width > data_size || PosR > 2) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels; cur_channel++) {
- unsigned int prev_byte = 0;
- for (i=cur_channel ; i<data_size ; i+=channels) {
-- int upper_pos=i-width;
-- if (upper_pos >= 3) {
-- unsigned char *upper_data = dest_data+upper_pos;
-+ if (i >= width+3) {
-+ unsigned char *upper_data = dest_data+i-width;
- unsigned int upper_byte = *upper_data;
- unsigned int upper_left_byte = *(upper_data-3);
- predicted = prev_byte+upper_byte-upper_left_byte;
-@@ -486,13 +491,14 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- break;
- }
- case VMSF_AUDIO: {
-- int channels=rarvm_data->R[0];
-+ unsigned int channels=rarvm_data->R[0];
- data_size = rarvm_data->R[4];
- src_data = rarvm_data->mem;
- dest_data = src_data + data_size;
-
- SET_VALUE(FALSE, &rarvm_data->mem[VM_GLOBALMEMADDR+0x20], data_size);
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ // In fact, audio channels never exceed 4.
-+ if (data_size > VM_GLOBALMEMADDR/2 || channels > 128 || channels == 0) {
- break;
- }
- for (cur_channel=0 ; cur_channel < channels ; cur_channel++) {
-@@ -553,7 +559,7 @@ static void execute_standard_filter(rarvm_data_t *rarvm_data, rarvm_standard_fil
- data_size = rarvm_data->R[4];
- src_pos = 0;
- dest_pos = data_size;
-- if ((unsigned int)data_size >= VM_GLOBALMEMADDR/2) {
-+ if (data_size > VM_GLOBALMEMADDR/2) {
- break;
- }
- while (src_pos < data_size) {
---
-2.16.2
-
diff --git a/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch b/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
deleted file mode 100644
index a457a71758c..00000000000
--- a/app-antivirus/clamav/files/clamav-0.99.3-fix-fd-leaks-in-cli_scanscript.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-Author: Manuel Mausz <manuel-clamav@mausz.at>
-
-http://lists.clamav.net/pipermail/clamav-users/2018-January/005687.html
-
---- clamav-0.99.3/libclamav/scanners.c.orig 2018-01-26 14:35:23.299386703 +0100
-+++ clamav-0.99.3/libclamav/scanners.c 2018-01-26 14:47:44.422451335 +0100
-@@ -1342,39 +1342,35 @@
- return CL_CLEAN;
- }
-
-- /* dump to disk only if explicitly asked to
-- * or if necessary to check relative offsets,
-- * otherwise we can process just in-memory */
-- if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-- if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
-- cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
-- return ret;
-- }
-- if (ctx->engine->keeptmp)
-- cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
-- }
--
- if(!(normalized = cli_malloc(SCANBUFF + maxpatlen))) {
- cli_dbgmsg("cli_scanscript: Unable to malloc %u bytes\n", SCANBUFF);
-- free(tmpname);
- return CL_EMEM;
- }
--
- text_normalize_init(&state, normalized, SCANBUFF + maxpatlen);
-- ret = CL_CLEAN;
--
-
- if ((ret = cli_ac_initdata(&tmdata, troot?troot->ac_partsigs:0, troot?troot->ac_lsigs:0, troot?troot->ac_reloff_num:0, CLI_DEFAULT_AC_TRACKLEN))) {
-- free(tmpname);
-+ free(normalized);
- return ret;
- }
-
- if ((ret = cli_ac_initdata(&gmdata, groot->ac_partsigs, groot->ac_lsigs, groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN))) {
- cli_ac_freedata(&tmdata);
-- free(tmpname);
-+ free(normalized);
- return ret;
- }
-
-+ /* dump to disk only if explicitly asked to
-+ * or if necessary to check relative offsets,
-+ * otherwise we can process just in-memory */
-+ if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-+ if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
-+ cli_dbgmsg("cli_scanscript: Can't generate temporary file/descriptor\n");
-+ goto done;
-+ }
-+ if (ctx->engine->keeptmp)
-+ cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
-+ }
-+
- mdata[0] = &tmdata;
- mdata[1] = &gmdata;
-
-@@ -1388,9 +1384,8 @@
-
- if (write(ofd, state.out, state.out_pos) == -1) {
- cli_errmsg("cli_scanscript: can't write to file %s\n",tmpname);
-- close(ofd);
-- free(tmpname);
-- return CL_EWRITE;
-+ ret = CL_EWRITE;
-+ goto done;
- }
- text_normalize_reset(&state);
- }
-@@ -1409,11 +1404,6 @@
- funmap(*ctx->fmap);
- }
- *ctx->fmap = map;
--
-- /* If we aren't keeping temps, delete the normalized file after scan. */
-- if(!(ctx->engine->keeptmp))
-- if (cli_unlink(tmpname)) ret = CL_EUNLINK;
--
- } else {
- /* Since the above is moderately costly all in all,
- * do the old stuff if there's no relative offsets. */
-@@ -1421,11 +1411,8 @@
- if (troot) {
- cli_targetinfo(&info, 7, map);
- ret = cli_ac_caloff(troot, &tmdata, &info);
-- if (ret) {
-- cli_ac_freedata(&tmdata);
-- free(tmpname);
-- return ret;
-- }
-+ if (ret)
-+ goto done;
- }
-
- while(1) {
-@@ -1466,13 +1453,6 @@
-
- }
-
-- if(ctx->engine->keeptmp) {
-- free(tmpname);
-- if (ofd >= 0)
-- close(ofd);
-- }
-- free(normalized);
--
- if(ret != CL_VIRUS || SCAN_ALL) {
- if ((ret = cli_exp_eval(ctx, troot, &tmdata, NULL, NULL)) == CL_VIRUS)
- viruses_found++;
-@@ -1481,9 +1461,19 @@
- viruses_found++;
- }
-
-+done:
-+ free(normalized);
- cli_ac_freedata(&tmdata);
- cli_ac_freedata(&gmdata);
-
-+ if (ofd != -1)
-+ close(ofd);
-+ if (tmpname != NULL) {
-+ if (!ctx->engine->keeptmp)
-+ if (cli_unlink(tmpname)) ret = CL_EUNLINK;
-+ free(tmpname);
-+ }
-+
- if (SCAN_ALL && viruses_found)
- return CL_VIRUS;
-
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/
@ 2016-07-03 11:57 Patrice Clement
0 siblings, 0 replies; 12+ messages in thread
From: Patrice Clement @ 2016-07-03 11:57 UTC (permalink / raw
To: gentoo-commits
commit: b1241030001d3607fe1724f0e77f4545576b5848
Author: Michael Mair-Keimberger (asterix) <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Fri Jul 1 19:48:58 2016 +0000
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sun Jul 3 11:28:26 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1241030
app-antivirus/clamav: remove unused initd files
Closes: https://github.com/gentoo/gentoo/pull/1812
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
app-antivirus/clamav/files/clamd.initd-r3 | 121 ----------------------------
app-antivirus/clamav/files/clamd.initd-r5 | 126 ------------------------------
2 files changed, 247 deletions(-)
diff --git a/app-antivirus/clamav/files/clamd.initd-r3 b/app-antivirus/clamav/files/clamd.initd-r3
deleted file mode 100644
index 134a701..0000000
--- a/app-antivirus/clamav/files/clamd.initd-r3
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-daemon_clamd="/usr/sbin/clamd"
-daemon_freshclam="/usr/bin/freshclam"
-daemon_milter="/usr/sbin/clamav-milter"
-
-extra_commands="logfix"
-
-depend() {
- use net
- provide antivirus
-}
-
-get_config() {
- clamconf | sed 's/["=]//g' | \
- awk "{
- if(\$0==\"Config file: $1.conf\") S=1
- if(S==1&&\$0==\"\") {
- print \"$3\"
- exit
- }
- if(S==1&&\$1~\"^$2\$\") {
- print \$2!=\"disabled\"?\$2:\"$3\"
- exit
- }
- }"
-}
-
-start() {
- local clamd_socket=$(get_config clamd LocalSocket /var/run/clamav/clamd.sock)
- local clamd_user=$(get_config clamd User clamav)
- local freshclam_user=$(get_config freshclam DatabaseOwner clamav)
- logfix
-
- if [ "${START_CLAMD}" = "yes" ]; then
- checkpath --quiet --mode 755 \
- --owner "${clamd_user}":"${clamd_user}" \
- --directory `dirname ${clamd_socket}`
- if [ -S "${clamd_socket}" ]; then
- rm -f ${clamd_socket}
- fi
- ebegin "Starting clamd"
- start-stop-daemon --start --quiet \
- --nicelevel ${CLAMD_NICELEVEL:-0} \
- --exec ${daemon_clamd}
- eend $? "Failed to start clamd"
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- ebegin "Starting freshclam"
- start-stop-daemon --start --quiet \
- --nicelevel ${FRESHCLAM_NICELEVEL:-0} \
- --exec ${daemon_freshclam} -- -d
- retcode=$?
- if [ ${retcode} = 1 ]; then
- eend 0
- einfo "Virus databases are already up to date."
- else
- eend ${retcode} "Failed to start freshclam"
- fi
- fi
-
- if [ "${START_MILTER}" = "yes" ]; then
- if [ -z "${MILTER_CONF_FILE}" ]; then
- MILTER_CONF_FILE="/etc/clamav-milter.conf"
- fi
-
- ebegin "Starting clamav-milter"
- start-stop-daemon --start --quiet \
- --nicelevel ${MILTER_NICELEVEL:-0} \
- --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
- eend $? "Failed to start clamav-milter"
- fi
-}
-
-stop() {
- if [ "${START_CLAMD}" = "yes" ]; then
- ebegin "Stopping clamd"
- start-stop-daemon --stop --quiet --name clamd
- eend $? "Failed to stop clamd"
- fi
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- ebegin "Stopping freshclam"
- start-stop-daemon --stop --quiet --name freshclam
- eend $? "Failed to stop freshclam"
- fi
- if [ "${START_MILTER}" = "yes" ]; then
- ebegin "Stopping clamav-milter"
- start-stop-daemon --stop --quiet --name clamav-milter
- eend $? "Failed to stop clamav-milter"
- fi
-}
-
-logfix() {
- if [ "${START_CLAMD}" = "yes" ]; then
- # fix clamd log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config clamd LogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${clamd_user}":"${clamd_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- # fix freshclam log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config freshclam UpdateLogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${freshclam_user}":"${freshclam_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-}
diff --git a/app-antivirus/clamav/files/clamd.initd-r5 b/app-antivirus/clamav/files/clamd.initd-r5
deleted file mode 100644
index 87171ae..0000000
--- a/app-antivirus/clamav/files/clamd.initd-r5
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-daemon_clamd="/usr/sbin/clamd"
-daemon_freshclam="/usr/bin/freshclam"
-daemon_milter="/usr/sbin/clamav-milter"
-
-extra_commands="logfix"
-
-depend() {
- use net
- provide antivirus
-}
-
-get_config() {
- clamconf | sed 's/["=]//g' | \
- awk "{
- if(\$0==\"Config file: $1.conf\") S=1
- if(S==1&&\$0==\"\") {
- print \"$3\"
- exit
- }
- if(S==1&&\$1~\"^$2\$\") {
- print \$2!=\"disabled\"?\$2:\"$3\"
- exit
- }
- }"
-}
-
-start() {
- # populate variables and fix log file permissions
- logfix
-
- if [ "${START_CLAMD}" = "yes" ]; then
- checkpath --quiet --mode 755 \
- --owner "${clamd_user}":"${clamd_user}" \
- --directory `dirname ${clamd_socket}`
- if [ -S "${clamd_socket}" ]; then
- rm -f ${clamd_socket}
- fi
- ebegin "Starting clamd"
- start-stop-daemon --start --quiet \
- --nicelevel ${CLAMD_NICELEVEL:-0} \
- --exec ${daemon_clamd}
- eend $? "Failed to start clamd"
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- checkpath --quiet --mode 755 \
- --owner "${clamd_user}":"${clamd_user}" \
- --directory `dirname ${clamd_socket}`
- ebegin "Starting freshclam"
- start-stop-daemon --start --quiet \
- --nicelevel ${FRESHCLAM_NICELEVEL:-0} \
- --exec ${daemon_freshclam} -- -d
- retcode=$?
- if [ ${retcode} = 1 ]; then
- eend 0
- einfo "Virus databases are already up to date."
- else
- eend ${retcode} "Failed to start freshclam"
- fi
- fi
-
- if [ "${START_MILTER}" = "yes" ]; then
- if [ -z "${MILTER_CONF_FILE}" ]; then
- MILTER_CONF_FILE="/etc/clamav-milter.conf"
- fi
-
- ebegin "Starting clamav-milter"
- start-stop-daemon --start --quiet \
- --nicelevel ${MILTER_NICELEVEL:-0} \
- --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
- eend $? "Failed to start clamav-milter"
- fi
-}
-
-stop() {
- if [ "${START_CLAMD}" = "yes" ]; then
- ebegin "Stopping clamd"
- start-stop-daemon --stop --quiet --name clamd
- eend $? "Failed to stop clamd"
- fi
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- ebegin "Stopping freshclam"
- start-stop-daemon --stop --quiet --name freshclam
- eend $? "Failed to stop freshclam"
- fi
- if [ "${START_MILTER}" = "yes" ]; then
- ebegin "Stopping clamav-milter"
- start-stop-daemon --stop --quiet --name clamav-milter
- eend $? "Failed to stop clamav-milter"
- fi
-}
-
-logfix() {
- clamd_socket=$(get_config clamd LocalSocket /run/clamav/clamd.sock)
- clamd_user=$(get_config clamd User clamav)
- freshclam_user=$(get_config freshclam DatabaseOwner clamav)
-
- if [ "${START_CLAMD}" = "yes" ]; then
- # fix clamd log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config clamd LogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${clamd_user}":"${clamd_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-
- if [ "${START_FRESHCLAM}" = "yes" ]; then
- # fix freshclam log permissions
- # (might be clobbered by logrotate or something)
- local logfile=$(get_config freshclam UpdateLogFile)
- if [ -n "${logfile}" ]; then
- checkpath --quiet \
- --owner "${freshclam_user}":"${freshclam_user}" \
- --mode 640 \
- --file ${logfile}
- fi
- fi
-}
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-03-23 6:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-31 18:19 [gentoo-commits] repo/gentoo:master commit in: app-antivirus/clamav/files/ Aaron Bauman
-- strict thread matches above, loose matches on Subject: below --
2024-03-23 6:05 Arthur Zamarin
2023-08-29 7:49 Conrad Kostecki
2022-02-09 23:06 Conrad Kostecki
2021-10-16 15:52 Thomas Raschbacher
2021-10-05 23:58 Michael Orlitzky
2021-04-19 19:06 Michael Orlitzky
2020-09-23 3:34 Michael Orlitzky
2019-04-04 21:16 Aaron Bauman
2018-10-07 18:21 Thomas Raschbacher
2018-05-27 16:11 Aaron Bauman
2016-07-03 11:57 Patrice Clement
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox