fix sar error when the directory /var/log/sa was removed

Resolves: RHEL-19301
This commit is contained in:
Lukáš Zaoral 2023-12-13 13:05:41 +01:00
parent 5dd19148d8
commit 24242c40bc
No known key found for this signature in database
GPG Key ID: 39157506DD67752D
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From 06e226703bee77e507f9f480807e230f677f0cb9 Mon Sep 17 00:00:00 2001
From: Sdrkun <shanzhikun@gmail.com>
Date: Tue, 28 Apr 2020 10:31:54 -0400
Subject: [PATCH] sa1: fix sar error when the directory var/log/sa was removed.
Signed-off-by: Sdrkun <shanzhikun@gmail.com>
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
Upstream-commit: 06e226703bee77e507f9f480807e230f677f0cb9
---
sa1.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/sa1.in b/sa1.in
index e908ad33..e9047d06 100644
--- a/sa1.in
+++ b/sa1.in
@@ -16,6 +16,7 @@
[ -r ${SYSCONFIG_DIR}/sysstat ] && . ${SYSCONFIG_DIR}/sysstat
[ -d ${SA_DIR} ] || SA_DIR=@SA_DIR@
+[ -d @SA_DIR@ ] || mkdir @SA_DIR@
if [ ${HISTORY} -gt 28 ]
then
--
2.43.0

View File

@ -1,7 +1,7 @@
Summary: Collection of performance monitoring tools for Linux
Name: sysstat
Version: 11.7.3
Release: 11%{?dist}
Release: 12%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://sebastien.godard.pagesperso-orange.fr/
@ -21,6 +21,7 @@ Patch06: CVE-2022-39377-arithmetic-overflow-in-allocate-structures-on-32-bit-sys
Patch07: 0001-sadc-Add-a-f-flag-to-force-fdatasync-use.patch
Patch08: 0001-mpstat-incorrect-cpu-usage-iowait.patch
Patch09: CVE-2023-33204.patch
Patch10: 0001-sa1-fix-sar-error-when-the-directory-var-log-sa-was-.patch
BuildRequires: gettext, lm_sensors-devel, systemd
Requires: findutils, xz
@ -57,6 +58,7 @@ The cifsiostat command reports I/O statistics for CIFS file systems.
%patch07 -p1
%patch08 -p1
%patch09 -p1
%patch10 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
@ -105,6 +107,9 @@ fi
%{_localstatedir}/log/sa
%changelog
* Wed Dec 13 2023 Lukáš Zaoral <lzaoral@redhat.com> - 11.7.3-12
- fix sar error when the directory /var/log/sa was removed (RHEL-19301)
* Fri Jul 07 2023 psimovec <psimovec@redhat.com> - 11.7.3-11
- fix the arithmetic overflow in allocate_structures() that is still possible on some 32 bit systems (CVE-2023-33204)