From aca91c4a418772503af8c6000b30e569379dcebc Mon Sep 17 00:00:00 2001 From: Daniel Novotny Date: Tue, 18 May 2010 12:13:52 +0000 Subject: [PATCH] fix #588322 --- psmisc-22.6-twoerr.patch | 14 ++++++++++++++ psmisc.spec | 7 ++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 psmisc-22.6-twoerr.patch diff --git a/psmisc-22.6-twoerr.patch b/psmisc-22.6-twoerr.patch new file mode 100644 index 0000000..105ac5b --- /dev/null +++ b/psmisc-22.6-twoerr.patch @@ -0,0 +1,14 @@ +diff -up psmisc-22.6/src/fuser.c.twoerr psmisc-22.6/src/fuser.c +--- psmisc-22.6/src/fuser.c.twoerr 2010-05-05 13:41:01.000000000 +0200 ++++ psmisc-22.6/src/fuser.c 2010-05-05 13:43:01.000000000 +0200 +@@ -818,8 +818,8 @@ int main(int argc, char *argv[]) + break; + default: /* FILE */ + this_name->filename = strdup(argv[optc]); +- parse_file(this_name, &match_inodes); +- parse_unixsockets(this_name, &match_inodes, unixsockets); ++ if( parse_file(this_name, &match_inodes) == 0 ) ++ parse_unixsockets(this_name, &match_inodes, unixsockets); + if (opts & OPT_MOUNTPOINT || opts & OPT_MOUNTS) + parse_mounts(this_name, &match_devices, opts); + break; diff --git a/psmisc.spec b/psmisc.spec index 1e90d0e..7ebf98b 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing processes on your system Name: psmisc Version: 22.6 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv2+ Group: Applications/System Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz @@ -15,6 +15,7 @@ Patch1: psmisc-22.6-pstree-overflow.patch #fix #497303 Patch2: psmisc-22.6-fuser-remove-mountlist.patch Patch3: psmisc-22.6-overflow2.patch +Patch4: psmisc-22.6-twoerr.patch BuildRequires: libselinux-devel BuildRequires: gettext @@ -35,6 +36,7 @@ of processes that are using specified files or filesystems. %patch1 -p1 -b .overflow %patch2 -p1 -b .mount %patch3 -p1 -b .overflow2 +%patch4 -p1 -b .twoerr %build export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" @@ -75,6 +77,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue May 18 2010 Daniel Novotny 22.6-14 +- fix #588322 - fuser'ing a non-existent file yields two error messages + * Wed Aug 05 2009 Lubomir Rintel - 22.6-13 - Fix a buffer overflow