Craig Small [Fri, 27 Jan 2012 02:11:25 +0000 (13:11 +1100)]
Added hardened CFLAGS
Debian and Ubuntu (at the least) have some CFLAGS that harden the binary
for some typical attacks. psmisc now will have these flags on by default
but checks the compilier supports them.
Sami Kerola [Wed, 4 Jan 2012 13:49:08 +0000 (14:49 +0100)]
build-sys: fix AC_TRY_LINK warnings
configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/gettext.m4:367: gt_INTL_MACOSX is expanded from...
m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
configure.ac:71: the top level
configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
configure.ac:71: the top level
configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
Craig Small [Sun, 19 Jun 2011 01:16:43 +0000 (11:16 +1000)]
2 Fixes for Debian Bug#623425
Both patches are by Jonathan Nieder <jrnieder@gmail.com>
Ever since psmisc 22.4 (2007-04-08), "killall <path>" compares
the target of the /proc/<pid>/exe link to <path> when comparison
of inode numbers fails. But the code to do this has two problems:
- readlink does not NUL-terminate, but we use strcmp to
compare strings. Probably this hasn't been a problem so far
because (1) the on-stack buffer happened to have zeroes in the
right places or (2) some implementations of readlink might
happen to NUL-terminate their result when convenient anyway.
- it relies on PATH_MAX to determine the size of the buffer,
so the code fails to build from source on platforms (like the
Hurd) that have no global PATH_MAX.
Fix both by using a buffer of size strlen("<path>") + 1 and comparing
the link target to <path> with memcmp after checking that it fit in
the buffer.
For consistency with the surrounding code, the pid is considered not
to match if malloc or readlink fails.
---------------
The Hurd has most of the expected /proc/<pid> hierarchy but no
/proc/self. Without this change, running "sleep 10 & killall sleep"
on that platform produces the confusing message:
/proc is empty (not mounted ?)
Craig Small [Tue, 22 Feb 2011 09:35:14 +0000 (20:35 +1100)]
Added SF patches and bug reports
* Applied patch from Werner Fink to avoid stat(2) on NFS mounts
* Zeros process group memory - Patch by jgorig SF#3152925 RH#666213
* fuser -m -s flags work - Patch by jgorig SF#31110178 RH#651794
* fuser silent if /proc/swaps not available SF#3072134
* ppc 64 support for peekfd by jgorig SF#3166444
* jiffies now ULL in killall SF#3138538
* pstree can show parents of a process. Patch supplied by Curtis Hawthorne SF#3135157
Werner Fink [Tue, 21 Sep 2010 07:04:16 +0000 (09:04 +0200)]
Add an option -w to fuser to be able to send signals
to processes which have write access to an open file
or directory. This option is silently ignored if -k is
not present too.
Werner Fink [Fri, 10 Sep 2010 09:18:53 +0000 (11:18 +0200)]
Fix file descriptor as well as memory leaks in fuser.
Strip @ symbol from file names read from /proc/net/unix.
This close the openSuSE bugs #536209, #529520, and #417841.
Craig Small [Fri, 10 Jul 2009 06:45:14 +0000 (06:45 +0000)]
* Applied patch from Kari Hautio for lazy umount'ed filesystems SF#25456
32
* Applied patch from Anonymous SF submitter to fix killall -l
Fixes SF#2002570
* fuser will print mounts,nfs exports and swaps with -v Debian #356655
* pstree and fuser have long options Debian #517412
Craig Small [Tue, 16 Dec 2008 10:15:16 +0000 (10:15 +0000)]
* Patch from Arnaud Giersch to fix udp ports in fuser Debian #502208
* pstree man page mentions -Z may not be available Debian #478327
* pstree handles UTF-8 lengths much better Debian #413503
* killall says no process found when process not found Debian #500097
* pstree makes a bigger buffer for -al flags Debian #352603