From 8877c5d487e58b99d4e1a560b6eb893a750f4a4e Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Thu, 4 Jul 2024 10:21:25 +0800 Subject: [PATCH] Backport upstream patch to fix error condition checking --- aide.spec | 9 ++++++- ...r-error-message-of-failing-to-open-g.patch | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 backport-Fix-condition-for-error-message-of-failing-to-open-g.patch diff --git a/aide.spec b/aide.spec index b09cbd3..3ec06c6 100644 --- a/aide.spec +++ b/aide.spec @@ -2,7 +2,7 @@ Name: aide Version: 0.17.4 -Release: 3 +Release: 4 Summary: Advanced Intrusion Detection Environment License: GPLv2+ URL: http://sourceforge.net/projects/aide @@ -25,6 +25,7 @@ Patch0: Add-sm3-algorithm-for-aide.patch Patch1: backport-Handle-malformed-database-lines.patch Patch2: backport-Fix-handling-of-duplicate-database-entries.patch Patch3: backport-Switch-from-PCRE-to-PCRE2-closes-116.patch +Patch4: backport-Fix-condition-for-error-message-of-failing-to-open-g.patch %description AIDE (Advanced Intrusion Detection Environment, [eyd]) is a file and directory integrity checker. @@ -80,6 +81,12 @@ make check %{_mandir}/*/* %changelog +* Thu Jul 4 2024 yixiangzhike - 0.17.4-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: backport upstream patch to fix error condition checking + * Tue Apr 25 2023 yixiangzhike - 0.17.4-3 - Type:bugfix - ID:NA diff --git a/backport-Fix-condition-for-error-message-of-failing-to-open-g.patch b/backport-Fix-condition-for-error-message-of-failing-to-open-g.patch new file mode 100644 index 0000000..d7093f1 --- /dev/null +++ b/backport-Fix-condition-for-error-message-of-failing-to-open-g.patch @@ -0,0 +1,27 @@ +From 87bd10564bb2497d9e6f03f12f4dd246fbcb1443 Mon Sep 17 00:00:00 2001 +From: Mingjie Shen +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 + -- Gitee