package/systemd: really fixup patch 20/21

The commit was not amended after performing the fixup mentioned in commit
ae43e724e8 (package/systemd: fix memory leak in systemd-journald).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Peter Korsgaard 2019-05-30 14:59:54 +02:00
parent ae43e724e8
commit 8022f7c984
2 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,7 @@
From 2d5d2e0cc5171c6795d2a485841474345d9e30ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 5 Dec 2018 18:48:23 +0100
Subject: [PATCH 1/2] basic/process-util: limit command line lengths to
_SC_ARG_MAX
Subject: [PATCH] basic/process-util: limit command line lengths to _SC_ARG_MAX
This affects systemd-journald and systemd-coredump.
@ -46,6 +45,8 @@ $ journalctl -o export -n1 'MESSAGE=Something logged' --output-fields=_CMDLINE|w
2MB might be hard for some clients to use meaningfully, but OTOH, it is
important to log the full commandline sometimes. For example, when the program
is crashing, the exact argument list is useful.
Signed-off-by: Jonah Petri <jonah@petri.us>
---
src/basic/process-util.c | 73 +++++++++++++++++-------------------------------
1 file changed, 25 insertions(+), 48 deletions(-)

View File

@ -1,14 +1,15 @@
From eb1ec489eef8a32918bbfc56a268c9d10464584d Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Tue, 22 Jan 2019 14:29:50 +0100
Subject: [PATCH 2/2] process-util: don't use overly large buffer to store
process command line
Subject: [PATCH] process-util: don't use overly large buffer to store process command line
Allocate new string as a return value and free our "scratch pad"
buffer that is potentially much larger than needed (up to
_SC_ARG_MAX).
Fixes #11502
Signed-off-by: Jonah Petri <jonah@petri.us>
---
src/basic/process-util.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)