From 58b5e3b39bd8a642a08a753994341a35ecef3289 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 02:43:46 +0000 Subject: import psmisc-22.20-15.el7 --- diff --git a/SOURCES/psmisc-22.20-fuser-finds-btrfs-procs.patch b/SOURCES/psmisc-22.20-fuser-finds-btrfs-procs.patch new file mode 100644 index 0000000..80a4f6b --- /dev/null +++ b/SOURCES/psmisc-22.20-fuser-finds-btrfs-procs.patch @@ -0,0 +1,45 @@ +diff -up ./src/fuser.c.ori ./src/fuser.c +--- ./src/fuser.c.ori 2017-01-27 16:13:01.822913522 +0100 ++++ ./src/fuser.c 2017-01-27 16:18:55.077040761 +0100 +@@ -191,10 +191,6 @@ scan_procs(struct names *names_head, str + struct stat *cwd_stat = NULL; + struct stat *exe_stat = NULL; + struct stat *root_stat = NULL; +-#ifdef _LISTS_H +- char path[256] = "/proc/", *slash; +- ssize_t len; +-#endif + + if (topproc_dent->d_name[0] < '0' || topproc_dent->d_name[0] > '9') /* Not a process */ + continue; +@@ -204,30 +200,12 @@ scan_procs(struct names *names_head, str + continue; + uid = getpiduid(pid); + +-#ifdef _LISTS_H +- strcpy(&path[6], topproc_dent->d_name); +- len = strlen(path); +- slash = &path[len]; +- +- *slash = '\0'; +- strcat(slash, "/cwd"); +- cwd_dev = device(path); +- +- *slash = '\0'; +- strcat(slash, "/exe"); +- exe_dev = device(path); +- +- *slash = '\0'; +- strcat(slash, "/root"); +- root_dev = device(path); +-#else + cwd_stat = get_pidstat(pid, "cwd"); + exe_stat = get_pidstat(pid, "exe"); + root_stat = get_pidstat(pid, "root"); + cwd_dev = cwd_stat ? cwd_stat->st_dev : 0; + exe_dev = exe_stat ? exe_stat->st_dev : 0; + root_dev = root_stat ? root_stat->st_dev : 0; +-#endif + + /* Scan the devices */ + for (dev_tmp = dev_head; dev_tmp != NULL; diff --git a/SOURCES/psmisc-22.20-fuser-manpage-other-pids-restrict.patch b/SOURCES/psmisc-22.20-fuser-manpage-other-pids-restrict.patch new file mode 100644 index 0000000..9fb846f --- /dev/null +++ b/SOURCES/psmisc-22.20-fuser-manpage-other-pids-restrict.patch @@ -0,0 +1,35 @@ +diff -up ./doc/fuser.1.ori ./doc/fuser.1 +--- ./doc/fuser.1.ori 2017-03-14 14:28:17.318871108 +0100 ++++ ./doc/fuser.1 2017-03-14 14:30:49.202273564 +0100 +@@ -235,6 +235,15 @@ privileges. As a consequence, files ope + other users may not be listed and executables may be classified as + mapped only. + .PP ++.B fuser ++cannot report on any processes that it doesn't have permission to look ++at the file descriptor table for. The most common time this problem ++occurs is when looking for TCP or UDP sockets when running ++.B fuser ++as a non-root user. In this case ++.B fuser ++will report no access. ++.PP + Installing + .B fuser + SUID root will avoid problems associated with partial information, but +@@ -261,15 +270,6 @@ fuser \-m /dev/sgX will show (or kill wi + even if you don't have that device configured. There may be other + devices it does this for too. + .PP +-.B fuser +-cannot report on any processes that it doesn't have permission to look +-at the file descriptor table for. The most common time this problem +-occurs is when looking for TCP or UDP sockets when running +-.B fuser +-as a non-root user. In this case +-.B fuser +-will report no access +-.PP + The mount \-m option will match any file within the save device as the + specified file, use the \-M option as well if you mean to specify only + the mount point. diff --git a/SOURCES/psmisc-22.20-peekfd-usage-extend-and-fix.patch b/SOURCES/psmisc-22.20-peekfd-usage-extend-and-fix.patch new file mode 100644 index 0000000..57b2c70 --- /dev/null +++ b/SOURCES/psmisc-22.20-peekfd-usage-extend-and-fix.patch @@ -0,0 +1,34 @@ +diff -up ./doc/peekfd.1.ori ./doc/peekfd.1 +--- ./doc/peekfd.1.ori 2017-03-29 10:50:34.386811561 +0200 ++++ ./doc/peekfd.1 2017-03-29 10:50:49.850755241 +0200 +@@ -13,7 +13,7 @@ peekfd \- peek at file descriptors of ru + .B peekfd + .RB [ \-8 , \-\-eight\-bit\-clean ] + .RB [ \-n , \-\-no\-headers ] +-.RB [ \-f , \-\-follow ] ++.RB [ \-c , \-\-follow ] + .RB [ \-d , \-\-duplicates\-removed ] + .RB [ \-V , \-\-version ] + .RB [ \-h , \-\-help ] +diff -up ./src/peekfd.c.ori ./src/peekfd.c +--- ./src/peekfd.c.ori 2017-03-29 10:50:23.450851390 +0200 ++++ ./src/peekfd.c 2017-03-29 10:50:49.850755241 +0200 +@@ -114,12 +114,12 @@ void print_version() + void usage() { + fprintf(stderr, _( + "Usage: peekfd [-8] [-n] [-c] [-d] [-V] [-h] [ ..]\n" +- " -8 output 8 bit clean streams.\n" +- " -n don't display read/write from fd headers.\n" +- " -c peek at any new child processes too.\n" +- " -d remove duplicate read/writes from the output.\n" +- " -V prints version info.\n" +- " -h prints this help.\n" ++ " -8, --eight-bit-clean output 8 bit clean streams.\n" ++ " -n, --no-headers don't display read/write from fd headers.\n" ++ " -c, --follow peek at any new child processes too.\n" ++ " -d, --duplicates-removed remove duplicate read/writes from the output.\n" ++ " -V, --version prints version info.\n" ++ " -h, --help prints this help.\n" + "\n" + " Press CTRL-C to end output.\n")); + } diff --git a/SPECS/psmisc.spec b/SPECS/psmisc.spec index 0c35f77..e98a8a8 100644 --- a/SPECS/psmisc.spec +++ b/SPECS/psmisc.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing processes on your system Name: psmisc Version: 22.20 -Release: 11%{?dist} +Release: 15%{?dist} License: GPLv2+ Group: Applications/System URL: http://sourceforge.net/projects/psmisc @@ -21,6 +21,9 @@ Patch5: pstree-introduce-namespace-transition-information.patch Patch6: psmisc-22.20-null-ptr-dereference.patch Patch7: psmisc-22.20-insufficient-path-len-in-mntinfo.patch Patch8: psmisc-22.20-prtstat-man-duplicate-options.patch +Patch9: psmisc-22.20-fuser-finds-btrfs-procs.patch +Patch10: psmisc-22.20-fuser-manpage-other-pids-restrict.patch +Patch11: psmisc-22.20-peekfd-usage-extend-and-fix.patch BuildRequires: libselinux-devel BuildRequires: gettext @@ -46,6 +49,9 @@ of processes that are using specified files or filesystems. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build %configure --prefix=%{_prefix} --enable-selinux @@ -71,11 +77,29 @@ mv $RPM_BUILD_ROOT%{_bindir}/fuser $RPM_BUILD_ROOT%{_sbindir} %{_mandir}/man1/prtstat.1* %ifarch %{ix86} x86_64 ppc %{power64} %{arm} mipsel %{_bindir}/peekfd -%endif %{_mandir}/man1/peekfd.1* +%else +%exclude %{_mandir}/man1/peekfd.1* +%endif %doc AUTHORS ChangeLog COPYING README %changelog +* Wed Mar 29 2017 Jan Rybar 22.20-15 +- peekfd: manpage and usage screen correction - long options +- Resolves: rhbz#1413632 + +* Mon Mar 20 2017 Jan Rybar 22.20-14 +- peekfd: manpage now not present on unsupported architectures +- Resolves: rhbz#1363651 + +* Tue Mar 14 2017 Jan Rybar 22.20-13 +- fuser manpage: note about invisible other PIDs moved to RESTRICTIONS section +- Resolves: rhbz#1400126 + +* Tue Jan 31 2017 Jan Rybar 22.20-12 +- fuser: processes binding btrfs directories can be found now +- Resolves: rhbz#1340056 + * Tue May 24 2016 Jan Rybar 22.20-11 - Fixing duplication of text in prtstat man page - Resolves: rhbz#1265243