From: MIvanchev <MIvanchev@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] audit: update to 3.1.4
Date: Wed, 19 Jun 2024 09:01:55 +0200 [thread overview]
Message-ID: <20240619070155.8FA2121785@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50666@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
There is an updated pull request by MIvanchev against master on the void-packages repository
https://github.com/MIvanchev/void-packages audit
https://github.com/void-linux/void-packages/pull/50666
audit: update to 3.1.4
#### Testing the changes
- I tested the changes in this PR: **NO**
A patch file from https://github.com/void-linux/void-packages/pull/50666.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audit-50666.patch --]
[-- Type: text/x-diff, Size: 3517 bytes --]
From 62fb21dc0f98a60e780a0050963f37137495651f Mon Sep 17 00:00:00 2001
From: Mihail Ivanchev <contact@ivanchev.net>
Date: Sun, 2 Jun 2024 22:28:22 +0200
Subject: [PATCH] audit: update to 3.1.4
---
srcpkgs/audit/patches/strndupa.patch | 64 ++++++++++++++++++++++++++++
srcpkgs/audit/template | 14 ++++--
2 files changed, 75 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/audit/patches/strndupa.patch
diff --git a/srcpkgs/audit/patches/strndupa.patch b/srcpkgs/audit/patches/strndupa.patch
new file mode 100644
index 00000000000000..dcd7f6330d4cf3
--- /dev/null
+++ b/srcpkgs/audit/patches/strndupa.patch
@@ -0,0 +1,64 @@
+diff --git a/auparse/auparse.c b/auparse/auparse.c
+index 20ebe4f8..ab3d3189 100644
+--- a/auparse/auparse.c
++++ b/auparse/auparse.c
+@@ -1224,12 +1224,23 @@ static int extract_timestamp(const char *b, au_event_t *e)
+ {
+ char *ptr, *tmp;
+ int rc = 1;
++ size_t len;
+
+ e->host = NULL;
+- if (*b == 'n')
+- tmp = strndupa(b, 340);
+- else
+- tmp = strndupa(b, 80);
++ if (*b == 'n') {
++ /* tmp = strndupa(b, 340); */
++ len = strnlen(b, 340);
++ tmp = alloca(len + 1);
++ tmp[len] = 0;
++ memcpy(tmp, b, len);
++ }
++ else {
++ /* tmp = strndupa(b, 80); */
++ len = strnlen(b, 80);
++ tmp = alloca(len + 1);
++ tmp[len] = 0;
++ memcpy(tmp, b, len);
++ }
+ ptr = audit_strsplit(tmp);
+ if (ptr) {
+ // Optionally grab the node - may or may not be included
+diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
+index 9893afb0..4695817e 100644
+--- a/src/ausearch-lol.c
++++ b/src/ausearch-lol.c
+@@ -178,12 +178,23 @@ static inline char *strndupa(const char *old, size_t n)
+ static int extract_timestamp(const char *b, event *e)
+ {
+ char *ptr, *tmp, *tnode, *ttype;
++ size_t len;
+
+ e->node = NULL;
+- if (*b == 'n')
+- tmp = strndupa(b, 340);
+- else
+- tmp = strndupa(b, 80);
++ if (*b == 'n') {
++ /* tmp = strndupa(b, 340); */
++ len = strnlen(b, 340);
++ tmp = alloca(len + 1);
++ tmp[len] = 0;
++ memcpy(tmp, b, len);
++ }
++ else {
++ /* tmp = strndupa(b, 80); */
++ len = strnlen(b, 80);
++ tmp = alloca(len + 1);
++ tmp[len] = 0;
++ memcpy(tmp, b, len);
++ }
+ ptr = audit_strsplit(tmp);
+ if (ptr) {
+ // Check to see if this is the node info
diff --git a/srcpkgs/audit/template b/srcpkgs/audit/template
index 63913bc07c31b6..5868d85ca33417 100644
--- a/srcpkgs/audit/template
+++ b/srcpkgs/audit/template
@@ -1,7 +1,7 @@
# Template file for 'audit'
pkgname=audit
-version=3.0.3
-revision=6
+version=3.1.4
+revision=1
build_style=gnu-configure
configure_args="--libdir=/usr/lib --enable-shared=audit --enable-gssapi-krb5
--with-apparmor --with-libcap-ng --with-python3"
@@ -15,13 +15,21 @@ license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="https://people.redhat.com/sgrubb/audit"
changelog="https://raw.githubusercontent.com/linux-audit/audit-userspace/master/ChangeLog"
distfiles="${homepage}/${pkgname}-${version}.tar.gz"
-checksum=23777e1dc9a80a2ee06a4d442a6a0a9bcbf1ae7ee4b5738a220ff619738cc904
+checksum=220a78cf35e6a7c57f42fcfc42b759692641c7e8e0e39c9844fbc0aa51783631
case "$XBPS_TARGET_MACHINE" in
*-musl) configure_args+=" --disable-zos-remote" ;;
*) ;;
esac
+post_patch() {
+ # See https://github.com/linux-audit/audit-userspace/issues/381
+ case "$XBPS_TARGET_MACHINE" in
+ *-musl) patch -Np1 -i "${FILESDIR}/musl.patch" ;;
+ *) ;;
+ esac
+}
+
post_install() {
vinstall rules/10-base-config.rules 644 etc/audit/rules.d
vmkdir usr/share/examples/audit/rules.d
next prev parent reply other threads:[~2024-06-19 7:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-02 20:28 [PR PATCH] " MIvanchev
2024-06-02 20:33 ` MIvanchev
2024-06-15 20:07 ` piekay
2024-06-15 21:13 ` piekay
2024-06-16 7:47 ` [PR PATCH] [Updated] " MIvanchev
2024-06-16 7:50 ` MIvanchev
2024-06-16 7:54 ` MIvanchev
2024-06-16 8:02 ` MIvanchev
2024-06-17 17:18 ` piekay
2024-06-17 20:03 ` [PR PATCH] [Updated] " MIvanchev
2024-06-17 20:04 ` MIvanchev
2024-06-17 20:17 ` [PR PATCH] [Updated] " MIvanchev
2024-06-18 16:47 ` [PR REVIEW] " classabbyamp
2024-06-19 7:01 ` MIvanchev [this message]
2024-06-19 7:26 ` [PR PATCH] [Updated] " MIvanchev
2024-06-21 23:50 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240619070155.8FA2121785@inbox.vuxu.org \
--to=mivanchev@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).