From eb340e9e164691c66914b07628da8378c02a47e0 Mon Sep 17 00:00:00 2001 From: Sergio Correia Date: Wed, 3 Nov 2021 10:13:12 -0300 Subject: [PATCH] When interpreting, if val is NULL return an empty string Resolves: rhbz#2004420 --- ...g-if-val-is-NULL-return-an-empty-str.patch | 26 +++++++++++++++++++ audit.spec | 8 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0004-When-interpreting-if-val-is-NULL-return-an-empty-str.patch diff --git a/0004-When-interpreting-if-val-is-NULL-return-an-empty-str.patch b/0004-When-interpreting-if-val-is-NULL-return-an-empty-str.patch new file mode 100644 index 0000000..a0e5ba2 --- /dev/null +++ b/0004-When-interpreting-if-val-is-NULL-return-an-empty-str.patch @@ -0,0 +1,26 @@ +From ae210cb59accb6ee03488b6ec14fb67aca22660f Mon Sep 17 00:00:00 2001 +From: Steve Grubb +Date: Sat, 21 Aug 2021 10:20:11 -0400 +Subject: [PATCH 4/4] When interpreting, if val is NULL return an empty string + +--- + auparse/interpret.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/auparse/interpret.c b/auparse/interpret.c +index 177ab82..63829aa 100644 +--- a/auparse/interpret.c ++++ b/auparse/interpret.c +@@ -840,6 +840,9 @@ static char *print_escaped(const char *val) + { + char *out; + ++ if (val == NULL) ++ return strdup(" "); ++ + if (*val == '"') { + char *term; + val++; +-- +2.33.1 + diff --git a/audit.spec b/audit.spec index fa841b7..ccd05f0 100644 --- a/audit.spec +++ b/audit.spec @@ -2,7 +2,7 @@ Summary: User space tools for kernel auditing Name: audit Version: 3.0.5 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: http://people.redhat.com/sgrubb/audit/ Source0: http://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -11,6 +11,7 @@ Source1: https://www.gnu.org/licenses/lgpl-2.1.txt Patch1: 0001-Add-ausysrulevalidate.patch Patch2: 0002-audit-3.0.6-time.patch Patch3: 0003-Carry-functions-file-from-initscripts-in-audit.patch +Patch4: 0004-When-interpreting-if-val-is-NULL-return-an-empty-str.patch BuildRequires: make gcc swig BuildRequires: openldap-devel @@ -94,6 +95,7 @@ cp %{SOURCE1} . %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Remove the ids code, its not ready sed -i 's/ ids / /' audisp/plugins/Makefile.in @@ -264,6 +266,10 @@ fi %attr(750,root,root) %{_sbindir}/audispd-zos-remote %changelog +* Wed Nov 03 2021 Sergio Correia - 3.0.5-4 +- When interpreting, if val is NULL return an empty string + Resolves: rhbz#2004420 + * Wed Nov 03 2021 Sergio Correia - 3.0.5-3 - Update dependency to initscripts-service instead of initscripts Resolves: rhbz#2000933