!49 [sync] PR-48: 修复clamonacc命令的--version和--writer选项的执行结果
From: @openeuler-sync-bot Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
253128b25c
25
clamav-clamonacc-version-return.patch
Normal file
25
clamav-clamonacc-version-return.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From 3a8b69890960aae06a51da2ac6833fbf8cfeeb72 Mon Sep 17 00:00:00 2001
|
||||||
|
From: caodongxia <315816521@qq.com>
|
||||||
|
Date: Mon, 9 Aug 2021 15:18:51 +0800
|
||||||
|
Subject: [PATCH] clamav-clamonacc-version-return
|
||||||
|
|
||||||
|
---
|
||||||
|
clamonacc/clamonacc.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/clamonacc/clamonacc.c b/clamonacc/clamonacc.c
|
||||||
|
index ec689f5..9ea95ad 100644
|
||||||
|
--- a/clamonacc/clamonacc.c
|
||||||
|
+++ b/clamonacc/clamonacc.c
|
||||||
|
@@ -358,7 +358,7 @@ static int startup_checks(struct onas_context *ctx)
|
||||||
|
|
||||||
|
if (optget(ctx->opts, "version")->enabled) {
|
||||||
|
onas_print_server_version(&ctx);
|
||||||
|
- ret = 2;
|
||||||
|
+ ret = 0;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
34
clamav-return-val-process.patch
Normal file
34
clamav-return-val-process.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From fe45bca164deeb1be053f5755546d71cc5dfd89b Mon Sep 17 00:00:00 2001
|
||||||
|
From: caodongxia <315816521@qq.com>
|
||||||
|
Date: Mon, 9 Aug 2021 14:27:22 +0800
|
||||||
|
Subject: [PATCH] fix-return-val-process
|
||||||
|
|
||||||
|
---
|
||||||
|
clamonacc/client/client.c | 10 +++++-----
|
||||||
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/clamonacc/client/client.c b/clamonacc/client/client.c
|
||||||
|
index 347070f..71c153d 100644
|
||||||
|
--- a/clamonacc/client/client.c
|
||||||
|
+++ b/clamonacc/client/client.c
|
||||||
|
@@ -207,12 +207,12 @@ int16_t onas_ping_clamd(struct onas_context **ctx)
|
||||||
|
|
||||||
|
if (opt) {
|
||||||
|
attempt_str = cli_strdup(opt->strarg);
|
||||||
|
+ if (NULL == attempt_str) {
|
||||||
|
+ logg("!could not allocate memory for string\n");
|
||||||
|
+ ret = -1;
|
||||||
|
+ goto done;
|
||||||
|
+ }
|
||||||
|
if (attempt_str) {
|
||||||
|
- if (NULL == attempt_str) {
|
||||||
|
- logg("!could not allocate memory for string\n");
|
||||||
|
- ret = -1;
|
||||||
|
- goto done;
|
||||||
|
- }
|
||||||
|
interval_str = strchr(attempt_str, ':');
|
||||||
|
if ((NULL != interval_str) && (interval_str[0] != '\0')) {
|
||||||
|
interval_str[0] = '\0';
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Name: clamav
|
Name: clamav
|
||||||
Summary: End-user tools for the Clam Antivirus scanner
|
Summary: End-user tools for the Clam Antivirus scanner
|
||||||
Version: 0.103.2
|
Version: 0.103.2
|
||||||
Release: 2
|
Release: 3
|
||||||
|
|
||||||
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
License: GPLv2 and Public Domain and bzip2-1.0.6 and Zlib and Apache-2.0
|
||||||
URL: https://www.clamav.net/
|
URL: https://www.clamav.net/
|
||||||
@ -28,6 +28,8 @@ Patch0004: clamav-check.patch
|
|||||||
Patch0005: clamav-clamonacc-service.patch
|
Patch0005: clamav-clamonacc-service.patch
|
||||||
Patch0006: clamav-freshclam.service.patch
|
Patch0006: clamav-freshclam.service.patch
|
||||||
Patch0007: clamav-type-conversion.patch
|
Patch0007: clamav-type-conversion.patch
|
||||||
|
Patch0008: clamav-return-val-process.patch
|
||||||
|
Patch0009: clamav-clamonacc-version-return.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
|
||||||
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
BuildRequires: gcc-c++ zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
|
||||||
@ -412,6 +414,9 @@ test -e %_var/log/clamav-milter.log || {
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 9 2021 caodongxia <caodongxia@huawei.com> - 0.103.2-3
|
||||||
|
- fix clamonacc --version and --writer return value
|
||||||
|
|
||||||
* Tue Jun 1 2021 caodongxia <caodongxia@huawei.com> - 0.103.2-2
|
* Tue Jun 1 2021 caodongxia <caodongxia@huawei.com> - 0.103.2-2
|
||||||
- fix left shift
|
- fix left shift
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user