aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hughes <davidhughes205@gmail.com>2021-04-15 08:18:30 -0400
committerDave Hughes <davidhughes205@gmail.com>2021-04-15 08:18:30 -0400
commit4e0f50f1fb7619279073c85dd5670017120862d8 (patch)
treea05b5706a7edafc0d6722a91a9bea5a27e893bda /sys-process
parentsys-process/psmisc: remove old patch (diff)
downloadmusl-4e0f50f1fb7619279073c85dd5670017120862d8.tar.gz
musl-4e0f50f1fb7619279073c85dd5670017120862d8.tar.bz2
musl-4e0f50f1fb7619279073c85dd5670017120862d8.zip
sys-process/psmisc: sync with ::gentoo
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Dave Hughes <davidhughes205@gmail.com>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch45
-rw-r--r--sys-process/psmisc/psmisc-23.4-r1.ebuild (renamed from sys-process/psmisc/psmisc-23.4.ebuild)5
2 files changed, 50 insertions, 0 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
new file mode 100644
index 0000000..59b2bfc
--- /dev/null
+++ b/sys-process/psmisc/files/psmisc-23.4-fuser_regression_revert.patch
@@ -0,0 +1,45 @@
+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/psmisc-23.4.ebuild b/sys-process/psmisc/psmisc-23.4-r1.ebuild
index 31edc94..7d1b6cc 100644
--- a/sys-process/psmisc/psmisc-23.4.ebuild
+++ b/sys-process/psmisc/psmisc-23.4-r1.ebuild
@@ -22,6 +22,11 @@ BDEPEND=">=sys-devel/libtool-2.2.6b
DOCS=( AUTHORS ChangeLog NEWS README )
+PATCHES=(
+ # https://gitlab.com/psmisc/psmisc/-/issues/35
+ "${FILESDIR}/${PN}-23.4-fuser_regression_revert.patch"
+)
+
src_prepare() {
default