diff options
author | Ørjan Malde <red@foxi.me> | 2024-08-13 11:45:31 +0200 |
---|---|---|
committer | Ørjan Malde <red@foxi.me> | 2024-08-13 11:45:31 +0200 |
commit | 0453080fd468f09edaa3f1155f81849bf6b43aac (patch) | |
tree | 642c45f91cdf38e86dfbb22fc9830875b92bd86d /patches/procps_ng-4.0.4.local.patch | |
parent | 4c9fe01d09e0794642fec00ed3264457484c74a3 (diff) | |
download | midipix_build-0453080fd468f09edaa3f1155f81849bf6b43aac.tar.bz2 midipix_build-0453080fd468f09edaa3f1155f81849bf6b43aac.tar.xz |
groups.d/231.native_packages_etc.d/procps_ng.package: bump to v4.0.4
Signed-off-by: Ørjan Malde <red@foxi.me>
Diffstat (limited to 'patches/procps_ng-4.0.4.local.patch')
-rw-r--r-- | patches/procps_ng-4.0.4.local.patch | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/patches/procps_ng-4.0.4.local.patch b/patches/procps_ng-4.0.4.local.patch new file mode 100644 index 00000000..37fb117a --- /dev/null +++ b/patches/procps_ng-4.0.4.local.patch @@ -0,0 +1,124 @@ +diff -ru procps-ng-4.0.4.orig/library/devname.c procps-ng-4.0.4/library/devname.c +--- procps-ng-4.0.4.orig/library/devname.c 2023-07-11 11:09:18.436786212 +0200 ++++ procps-ng-4.0.4/library/devname.c 2024-08-13 11:40:55.012140114 +0200 +@@ -287,7 +287,7 @@ + struct stat sbuf; + char path[32]; + ssize_t count; +- const int len = snprintf(path, sizeof path, "/proc/%d/%s", pid, name); /* often permission denied */ ++ const int len = snprintf(path, sizeof path, "/proc/sysproc/%d/%s", pid, name); /* often permission denied */ + if(len <= 0 || (size_t)len >= sizeof path) return 0; + count = readlink(path,buf,TTY_NAME_SIZE-1); + if(count <= 0 || count >= TTY_NAME_SIZE-1) return 0; +@@ -305,7 +305,7 @@ + char path[32]; + FILE *fp; + char *lf; +- sprintf (path, "/proc/%d/ctty", pid); /* often permission denied */ ++ sprintf (path, "/proc/sysproc/%d/ctty", pid); /* often permission denied */ + fp = fopen (path, "r"); + if (!fp) + return 0; +diff -ru procps-ng-4.0.4.orig/library/readproc.c procps-ng-4.0.4/library/readproc.c +--- procps-ng-4.0.4.orig/library/readproc.c 2023-07-11 11:09:18.436786212 +0200 ++++ procps-ng-4.0.4/library/readproc.c 2024-08-13 11:38:26.689488350 +0200 +@@ -1389,7 +1389,7 @@ + p->tgid = strtoul(ent->d_name, NULL, 10); + if (errno == 0) { + p->tid = p->tgid; +- snprintf(path, PROCPATHLEN, "/proc/%d", p->tgid); ++ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d", p->tgid); + return 1; + } + } +@@ -1408,7 +1408,7 @@ + closedir(PT->taskdir); + } + // use "path" as some tmp space +- snprintf(path, PROCPATHLEN, "/proc/%d/task", p->tgid); ++ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d/task", p->tgid); + PT->taskdir = opendir(path); + if(!PT->taskdir) return 0; + PT->taskdir_user = p->tgid; +@@ -1421,7 +1421,7 @@ + t->tid = strtoul(ent->d_name, NULL, 10); + t->tgid = p->tgid; + //t->ppid = p->ppid; // cover for kernel behavior? we want both actually...? +- snprintf(path, PROCPATHLEN, "/proc/%d/task/%.10s", p->tgid, ent->d_name); ++ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d/task/%.10s", p->tgid, ent->d_name); + return 1; + } + +@@ -1435,7 +1435,7 @@ + char *path = PT->path; + + if (pid) { +- snprintf(path, PROCPATHLEN, "/proc/%d", pid); ++ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d", pid); + p->tid = p->tgid = pid; // this tgid may be a huge fib | + + /* the 'status' directory is the only place where we find the | +diff -ru procps-ng-4.0.4.orig/src/pidof.c procps-ng-4.0.4/src/pidof.c +--- procps-ng-4.0.4.orig/src/pidof.c 2023-08-15 13:02:25.783784823 +0200 ++++ procps-ng-4.0.4/src/pidof.c 2024-08-13 11:31:47.634655407 +0200 +@@ -124,7 +124,7 @@ + ssize_t path_alloc_size; + ssize_t len; + +- snprintf(link, sizeof(link), "/proc/%d/%s", pid, base_name); ++ snprintf(link, sizeof(link), "/proc/sysproc/%d/%s", pid, base_name); + + len = path_alloc_size = 0; + result = NULL; +diff -ru procps-ng-4.0.4.orig/src/pmap.c procps-ng-4.0.4/src/pmap.c +--- procps-ng-4.0.4.orig/src/pmap.c 2023-08-15 12:43:38.772140122 +0200 ++++ procps-ng-4.0.4/src/pmap.c 2024-08-13 11:28:36.375534274 +0200 +@@ -554,11 +554,11 @@ + printf("%u: %s\n", PIDS_VAL(tgid, s_int, p, Pids_info), PIDS_VAL(cmdline, str, p, Pids_info)); + + if (x_option || X_option || c_option) { +- snprintf(buf, sizeof buf, "/proc/%u/smaps", PIDS_VAL(tgid, s_int, p, Pids_info)); ++ snprintf(buf, sizeof buf, "/proc/sysproc/%u/smaps", PIDS_VAL(tgid, s_int, p, Pids_info)); + if ((fp = fopen(buf, "r")) == NULL) + return 1; + } else { +- snprintf(buf, sizeof buf, "/proc/%u/maps", PIDS_VAL(tgid, s_int, p, Pids_info)); ++ snprintf(buf, sizeof buf, "/proc/sysproc/%u/maps", PIDS_VAL(tgid, s_int, p, Pids_info)); + if ((fp = fopen(buf, "r")) == NULL) + return 1; + } +diff -ru procps-ng-4.0.4.orig/src/ps/global.c procps-ng-4.0.4/src/ps/global.c +--- procps-ng-4.0.4.orig/src/ps/global.c 2023-08-16 00:54:03.759538026 +0200 ++++ procps-ng-4.0.4/src/ps/global.c 2024-08-13 11:25:38.536358536 +0200 +@@ -176,7 +176,7 @@ + const char *bsd_v_format = (const char *)0xdeadbeef; + int bsd_c_option = -1; + int bsd_e_option = -1; +-unsigned cached_euid = 0xffffffff; ++uid_t cached_euid = 0xffffffff; + int cached_tty = -1; + char forest_prefix[4 * 32*1024 + 100]; // FIXME + int forest_type = -1; +diff -ru procps-ng-4.0.4.orig/src/pwdx.c procps-ng-4.0.4/src/pwdx.c +--- procps-ng-4.0.4.orig/src/pwdx.c 2023-07-11 11:09:18.464787022 +0200 ++++ procps-ng-4.0.4/src/pwdx.c 2024-08-13 11:31:25.734756041 +0200 +@@ -53,8 +53,8 @@ + long pid; + char *end = NULL; + +- if (!strncmp("/proc/", input, 6)) +- skip = 6; ++ if (!strncmp("/proc/sysproc/", input, 14)) ++ skip = 14; + errno = 0; + pid = strtol(input + skip, &end, 10); + +@@ -122,7 +122,7 @@ + * the first char is possible + */ + if (argv[i][0] != '/') +- snprintf(buf, buflen, "/proc/%s/cwd", argv[i]); ++ snprintf(buf, buflen, "/proc/sysproc/%s/cwd", argv[i]); + else + snprintf(buf, buflen, "%s/cwd", argv[i]); + |