!54 [sync] PR-52: 【Mainline】Backport upstream patch to fix error condition checking

From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
This commit is contained in:
openeuler-ci-bot 2024-07-04 06:11:09 +00:00 committed by Gitee
commit c2fae6847a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Name: aide Name: aide
Version: 0.18.6 Version: 0.18.6
Release: 1 Release: 2
Summary: Advanced Intrusion Detection Environment Summary: Advanced Intrusion Detection Environment
License: GPLv2+ License: GPLv2+
URL: https://sourceforge.net/projects/aide URL: https://sourceforge.net/projects/aide
@ -21,6 +21,7 @@ BuildRequires: check-devel
Requires: libgcrypt-sm3 Requires: libgcrypt-sm3
Patch0: Add-sm3-algorithm-for-aide.patch Patch0: Add-sm3-algorithm-for-aide.patch
Patch1: backport-Fix-condition-for-error-message-of-failing-to-open-g.patch
%description %description
AIDE (Advanced Intrusion Detection Environment, [eyd]) is a file and directory integrity checker. AIDE (Advanced Intrusion Detection Environment, [eyd]) is a file and directory integrity checker.
@ -73,6 +74,12 @@ make check
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Thu Jul 4 2024 yixiangzhike <yixiangzhike007@163.com> - 0.18.6-2
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: backport upstream patch to fix error condition checking
* Fri Dec 15 2023 Paul Thomas <paulthomas100199@gmail.com> - 0.18.6-1 * Fri Dec 15 2023 Paul Thomas <paulthomas100199@gmail.com> - 0.18.6-1
- Type: enhancement - Type: enhancement
- ID: NA - ID: NA

View File

@ -0,0 +1,27 @@
From 87bd10564bb2497d9e6f03f12f4dd246fbcb1443 Mon Sep 17 00:00:00 2001
From: Mingjie Shen <shen497@purdue.edu>
Date: Tue, 14 Nov 2023 16:00:05 -0500
Subject: [PATCH] Fix condition for error message of failing to open gzipped
files
gzfh should be checked, instead of fh.
---
src/be.c | 2 +-
2 files changed, 1 insertions(+), 1 deletion(-)
diff --git a/src/be.c b/src/be.c
index 39592cd..9ddaa48 100644
--- a/src/be.c
+++ b/src/be.c
@@ -160,7 +160,7 @@ void* be_init(bool readonly, url_t* u, bool iszipped, bool append, int linenumbe
#ifdef WITH_ZLIB
if(iszipped && !readonly){
gzFile gzfh = gzdopen(a,"w");
- if(fh==NULL){
+ if(gzfh==NULL){
log_msg(LOG_LEVEL_ERROR,"couldn't reopen file descriptor %li",a);
}
return gzfh;
--
2.33.0