From 0cb55aafb06e625376fe106e13a6d4c1a01379b1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 1 Sep 2008 13:32:59 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/psmisc?expand=0&rev=10 --- psmisc-22.6-fdleak.patch | 23 +++++++++++++++++++++++ psmisc.changes | 6 ++++++ psmisc.spec | 7 ++++++- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 psmisc-22.6-fdleak.patch diff --git a/psmisc-22.6-fdleak.patch b/psmisc-22.6-fdleak.patch new file mode 100644 index 0000000..4b71eda --- /dev/null +++ b/psmisc-22.6-fdleak.patch @@ -0,0 +1,23 @@ +--- src/fuser.c ++++ src/fuser.c 2008-09-01 15:03:05.054239318 +0200 +@@ -925,8 +925,10 @@ int main(int argc, char *argv[]) + continue; + } + +- scan_mount_devices(opts, &mount_devices); +- fill_unix_cache(&unixsockets); ++ if (!mount_devices) ++ scan_mount_devices(opts, &mount_devices); ++ if (!unixsockets) ++ fill_unix_cache(&unixsockets); + + /* File specifications */ + if ( (this_name = malloc(sizeof(struct names))) == NULL) +@@ -1306,6 +1308,7 @@ void fill_unix_cache(struct unixsocket_l + *unixsocket_head = newsocket; + } /* while */ + ++ fclose(fp); + } + + /* diff --git a/psmisc.changes b/psmisc.changes index ae0baa6..f96a54e 100644 --- a/psmisc.changes +++ b/psmisc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 1 15:10:43 CEST 2008 - werner@suse.de + +- Do not leak on /proc/net/unix (bnc#417841) +- Read /proc/net/unix and /proc/mounts only once + ------------------------------------------------------------------- Fri Aug 22 17:12:24 CEST 2008 - prusnak@suse.cz diff --git a/psmisc.spec b/psmisc.spec index 3026a0b..943d344 100644 --- a/psmisc.spec +++ b/psmisc.spec @@ -27,7 +27,7 @@ Group: System/Monitoring PreReq: %fillup_prereq %insserv_prereq AutoReqProv: on Version: 22.6 -Release: 49 +Release: 52 Provides: ps:/usr/bin/killall Summary: Utilities for managing processes on your system Source: http://switch.dl.sourceforge.net/sourceforge/psmisc/psmisc-%{version}.tar.bz2 @@ -36,6 +36,7 @@ Patch1: %name-22.5-pstree.patch Patch2: %name-22.6-nfs4fuser.patch Patch3: %name-22.6-netunix.patch Patch4: %name-22.6-writeonly.patch +Patch5: %name-22.6-fdleak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %define nopeek s390 s390x ia64 @@ -59,6 +60,7 @@ Authors: %patch2 -p0 -b .nfs4fuser %patch3 -p0 -b .netunix %patch4 -p0 -b .wrtonly +%patch5 -p0 -b .fdleak %patch0 -p0 %build @@ -101,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/pstree.1* %changelog +* Mon Sep 01 2008 werner@suse.de +- Do not leak on /proc/net/unix (bnc#417841) +- Read /proc/net/unix and /proc/mounts only once * Fri Aug 22 2008 prusnak@suse.cz - enabled SELinux support [Fate#303662] * Thu Aug 07 2008 werner@suse.de