From 18a1d7a14991c310886ccccbe14bd4f13697d69b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 3 Nov 2020 06:53:24 -0500 Subject: [PATCH] import psmisc-23.1-5.el8 --- .../psmisc-23.1-pstree-consecutive-NULs.patch | 17 +++++++++++++++++ SPECS/psmisc.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 SOURCES/psmisc-23.1-pstree-consecutive-NULs.patch diff --git a/SOURCES/psmisc-23.1-pstree-consecutive-NULs.patch b/SOURCES/psmisc-23.1-pstree-consecutive-NULs.patch new file mode 100644 index 0000000..976d4c7 --- /dev/null +++ b/SOURCES/psmisc-23.1-pstree-consecutive-NULs.patch @@ -0,0 +1,17 @@ +diff -up ./src/pstree.c.ori ./src/pstree.c +--- ./src/pstree.c.ori 2017-06-12 02:24:29.089210495 +0200 ++++ ./src/pstree.c 2020-07-03 21:24:47.257760342 +0200 +@@ -530,8 +530,12 @@ static void set_args(PROC * this, const + } + this->argc = 0; + for (i = 0; i < size - 1; i++) +- if (!args[i]) ++ if (!args[i]) { + this->argc++; ++ /* now skip consecutive NUL */ ++ while(!args[i] && (i < size -1 )) ++ i++; ++ } + if (!this->argc) + return; + if (!(this->argv = malloc(sizeof(char *) * this->argc))) { diff --git a/SPECS/psmisc.spec b/SPECS/psmisc.spec index b34cedb..f6c0b90 100644 --- a/SPECS/psmisc.spec +++ b/SPECS/psmisc.spec @@ -2,7 +2,7 @@ Summary: Utilities for managing processes on your system Name: psmisc Version: 23.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/System URL: https://gitlab.com/psmisc/psmisc @@ -12,6 +12,7 @@ Source: https://sourceforge.net/projects/%{name}/files/%{name}/%{name}-%{version #The following has been reworked by upstream in a different way ... we'll see #Patch1: psmisc-22.13-fuser-silent.patch Patch2: psmisc-23.1-no-nullptr-sanity-stalls-nfs.patch +Patch3: psmisc-23.1-pstree-consecutive-NULs.patch BuildRequires: libselinux-devel BuildRequires: gettext @@ -31,6 +32,7 @@ command shows the path of log files owned by a given process. %prep %setup -q %patch2 -p1 +%patch3 -p1 %build %configure --prefix=%{_prefix} --enable-selinux @@ -69,6 +71,10 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_sbindir} %changelog +* Fri Jul 03 2020 Jan Rybar - 23.1-5 +- pstree -al incorrectly handles large empty cmdline +- Resolves: rhbz#1715509 + * Wed Jun 12 2019 Jan Rybar - 23.1-4 - backport of patch fixing fuser stalling NFS on non-existent file - Resolves: rhbz#1693785