summaryrefslogtreecommitdiff
path: root/sys-process/psmisc/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/psmisc/files')
-rw-r--r--sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch45
-rw-r--r--sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch40
2 files changed, 0 insertions, 85 deletions
diff --git a/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch b/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch
deleted file mode 100644
index 59b2bfcef1de..000000000000
--- a/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-https://gitlab.com/psmisc/psmisc/-/issues/35
-
-diff --git a/ChangeLog b/ChangeLog
-index df45ae3..be20ca0 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -5,8 +5,6 @@ Changes in 23.4
- * pstree: fix layout when using -C !24
- * pstree: add time namespace !25
- * pstree: Dynamically link to selinux and use attr
-- * fuser: Get less confused about duplicate dev_id !10
-- * fuser: Only check pathname on non-block devices !31
-
- Changes in 23.3
- ===============
-diff --git a/src/fuser.c b/src/fuser.c
-index 03e6237..f9d78db 100644
---- a/src/fuser.c
-+++ b/src/fuser.c
-@@ -1566,7 +1566,6 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head,
- struct stat st, lst;
- char *dirpath;
- char filepath[PATH_MAX];
-- char real_filepath[PATH_MAX];
-
- if (asprintf(&dirpath, "/proc/%d/%s", pid, dirname) < 0)
- return;
-@@ -1605,17 +1604,6 @@ check_dir(const pid_t pid, const char *dirname, struct device_list *dev_head,
- dev_tmp = dev_tmp->next) {
- if (thedev != dev_tmp->device)
- continue;
--
-- /* check the paths match if it is not a block device */
-- if (! S_ISBLK(dev_tmp->name->st.st_mode)) {
-- if (readlink(filepath, real_filepath, PATH_MAX-1) < 0) {
-- if (strncmp(dev_tmp->name->filename, filepath, strlen(dev_tmp->name->filename)) != 0)
-- continue;
-- } else {
-- if (strncmp(dev_tmp->name->filename, real_filepath, strlen(dev_tmp->name->filename)) != 0)
-- continue;
-- }
-- }
- if (access == ACCESS_FILE
- && (lstat(filepath, &lst) == 0)
- && (lst.st_mode & S_IWUSR)) {
diff --git a/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch b/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch
deleted file mode 100644
index 0fc9c30a9635..000000000000
--- a/sys-process/psmisc/files/psmisc-23.5-fix-killall-pidfd_send_signal.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://gitlab.com/psmisc/psmisc/-/commit/6892e321e7042e3df60a5501a1c59d076e8a856f
-
-From 6892e321e7042e3df60a5501a1c59d076e8a856f Mon Sep 17 00:00:00 2001
-From: Craig Small <csmall@dropbear.xyz>
-Date: Mon, 18 Jul 2022 20:16:42 +1000
-Subject: [PATCH] killall: use kill if pidfd_send_signal() fails
-
-The pidfd_send_signal() system call appeared in Linux 5.1
-If psmisc is build on a system before then, or a non-Linux
-system, then kill() is used instead. However if psmisc is
-built on a Linux >= 5.1 system but run on a < 5.1 Linux
-system the system call fails and killall doesn't work.
-
-The fix, as proposed by Peter T. Breuer, is to try
-pidfd_send_signal() and if the return value is < 0 and
-errno is ENOSYS then we know at runtime the system call
-failed and we fall through to trusty old kill().
-
-Note, this means that killall on systems below 5.1 still
-have the race PID condition that the pidfd calls fix.
-
-References:
- https://bugs.debian.org/1015228
---- a/src/killall.c
-+++ b/src/killall.c
-@@ -326,7 +326,12 @@ my_send_signal(
- {
- #ifdef __NR_pidfd_send_signal
- if (pid > 0) /* Not PGID */
-- return syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
-+ {
-+ int ret = syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
-+ if (ret >= 0 || errno != ENOSYS)
-+ return ret;
-+ // fall through if no such syscall
-+ }
- #endif
- return kill(pid, sig);
- }
-GitLab