From cf2d8621e91c6d0dc3423421a6df6ef39ee2976e Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Tue, 19 Dec 2023 19:00:55 +0800 Subject: [PATCH] Backport patches from upstream --- audit.spec | 15 +++- ...t-Add-bad-option-to-aulast-usage-176.patch | 25 +++++++ ...-escape-option-to-aureport-usage-184.patch | 23 +++++++ ...lowing-options-to-ausearch-usage-185.patch | 33 +++++++++ ...ort-Add-man-page-for-audit_close-195.patch | 60 ++++++++++++++++ ...-man-page-for-audit_encode_value-199.patch | 69 +++++++++++++++++++ ...dd-man-page-for-audit_is_enabled-200.patch | 60 ++++++++++++++++ ...e-for-audit_value_needs_encoding-197.patch | 46 +++++++++++++ ...E-of-void-auparse_add_callback-3-190.patch | 25 +++++++ ...orrect-function-name-in-man-page-182.patch | 39 +++++++++++ ...ort-update-makefile-for-new-man-page.patch | 32 +++++++++ 11 files changed, 426 insertions(+), 1 deletion(-) create mode 100644 backport-Add-bad-option-to-aulast-usage-176.patch create mode 100644 backport-Add-escape-option-to-aureport-usage-184.patch create mode 100644 backport-Add-following-options-to-ausearch-usage-185.patch create mode 100644 backport-Add-man-page-for-audit_close-195.patch create mode 100644 backport-Add-man-page-for-audit_encode_value-199.patch create mode 100644 backport-Add-man-page-for-audit_is_enabled-200.patch create mode 100644 backport-Add-man-page-for-audit_value_needs_encoding-197.patch create mode 100644 backport-Fix-RETURN-VALUE-of-void-auparse_add_callback-3-190.patch create mode 100644 backport-Fix-incorrect-function-name-in-man-page-182.patch create mode 100644 backport-update-makefile-for-new-man-page.patch diff --git a/audit.spec b/audit.spec index aa70730..fb5aa73 100644 --- a/audit.spec +++ b/audit.spec @@ -4,7 +4,7 @@ Summary: User space tools for kernel auditing Name: audit Epoch: 1 Version: 3.0 -Release: 10 +Release: 11 License: GPLv2+ and LGPLv2+ URL: https://people.redhat.com/sgrubb/audit/ Source0: https://people.redhat.com/sgrubb/audit/%{name}-%{version}.tar.gz @@ -45,6 +45,16 @@ Patch31: backport-asprintf-can-return-a-negative-number.patch Patch32: backport-Cleanup-gssapi-code.patch Patch33: backport-Fix-another-krb5-memory-leak.patch Patch34: backport-Try-to-interpret-OPENAT2-fields-correctly.patch +Patch35: backport-Add-bad-option-to-aulast-usage-176.patch +Patch36: backport-Fix-incorrect-function-name-in-man-page-182.patch +Patch37: backport-Add-escape-option-to-aureport-usage-184.patch +Patch38: backport-Add-following-options-to-ausearch-usage-185.patch +Patch39: backport-Fix-RETURN-VALUE-of-void-auparse_add_callback-3-190.patch +Patch40: backport-Add-man-page-for-audit_close-195.patch +Patch41: backport-Add-man-page-for-audit_value_needs_encoding-197.patch +Patch42: backport-update-makefile-for-new-man-page.patch +Patch43: backport-Add-man-page-for-audit_encode_value-199.patch +Patch44: backport-Add-man-page-for-audit_is_enabled-200.patch BuildRequires: gcc swig libtool systemd kernel-headers >= 2.6.29 BuildRequires: openldap-devel krb5-devel libcap-ng-devel @@ -397,6 +407,9 @@ fi %attr(644,root,root) %{_mandir}/man8/*.8.gz %changelog +* Tue Dec 19 2023 yixiangzhike - 1:3.0-11 +- backport patches from upstream + * Thu Mar 23 2023 dongyuzhen - 1:3.0-10 - backport patches from upstream diff --git a/backport-Add-bad-option-to-aulast-usage-176.patch b/backport-Add-bad-option-to-aulast-usage-176.patch new file mode 100644 index 0000000..57b308e --- /dev/null +++ b/backport-Add-bad-option-to-aulast-usage-176.patch @@ -0,0 +1,25 @@ +From 032185623414a34459fc22f9b2d30c1d5da9721a Mon Sep 17 00:00:00 2001 +From: MIZUTA Takeshi +Date: Thu, 22 Apr 2021 06:05:41 +0900 +Subject: [PATCH] Add --bad option to aulast usage (#176) + +--- + tools/aulast/aulast.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/aulast/aulast.c b/tools/aulast/aulast.c +index 46737a7d..a0b674ee 100644 +--- a/tools/aulast/aulast.c ++++ b/tools/aulast/aulast.c +@@ -45,7 +45,7 @@ static char *cterm = NULL, *user = NULL; + void usage(void) + { + fprintf(stderr, +- "usage: aulast [--stdin] [--proof] [--extract] [-f file] [--user name] [--tty tty]\n"); ++ "usage: aulast [--bad] [--stdin] [--proof] [--extract] [-f file] [--user name] [--tty tty]\n"); + } + + /* This outputs a line of text reporting the login/out times */ +-- +2.27.0 + diff --git a/backport-Add-escape-option-to-aureport-usage-184.patch b/backport-Add-escape-option-to-aureport-usage-184.patch new file mode 100644 index 0000000..0eb120e --- /dev/null +++ b/backport-Add-escape-option-to-aureport-usage-184.patch @@ -0,0 +1,23 @@ +From 651b60c25485fd8563f9a0b27763bae1ea5048ef Mon Sep 17 00:00:00 2001 +From: MIZUTA Takeshi +Date: Fri, 23 Apr 2021 19:22:52 +0900 +Subject: [PATCH] Add --escape option to aureport usage (#184) + +--- + src/aureport-options.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/aureport-options.c b/src/aureport-options.c +index 0967c024..167157ac 100644 +--- a/src/aureport-options.c ++++ b/src/aureport-options.c +@@ -179,5 +179,6 @@ static void usage(void) + "\t-cr,--crypto\t\t\tCrypto report\n" + "\t-e,--event\t\t\tEvent report\n" ++ "\t--escape option\t\t\tEscape output\n" + "\t-f,--file\t\t\tFile name report\n" + "\t--failed\t\t\tonly failed events in report\n" + "\t-h,--host\t\t\tRemote Host name report\n" +-- +2.27.0 + diff --git a/backport-Add-following-options-to-ausearch-usage-185.patch b/backport-Add-following-options-to-ausearch-usage-185.patch new file mode 100644 index 0000000..4b75ad5 --- /dev/null +++ b/backport-Add-following-options-to-ausearch-usage-185.patch @@ -0,0 +1,33 @@ +From 222dbaf5de27ab85e7aafcc7ea2cb68af2eab9b9 Mon Sep 17 00:00:00 2001 +From: MIZUTA Takeshi +Date: Fri, 23 Apr 2021 19:23:51 +0900 +Subject: [PATCH] Add following options to ausearch usage (#185) + +--escape + --extra-keys + --extra-labels + --extra-obj2 + --extra-time +--- + src/ausearch-options.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/ausearch-options.c b/src/ausearch-options.c +index 28c0f08d..579c89bd 100644 +--- a/src/ausearch-options.c ++++ b/src/ausearch-options.c +@@ -202,6 +202,11 @@ static void usage(void) + "\t--checkpoint \tsearch from last complete event\n" + "\t--debug\t\t\tWrite malformed events that are skipped to stderr\n" + "\t-e,--exit \tsearch based on syscall exit code\n" ++ "\t-escape