|
|
045308 |
diff -ru procps-ng-4.0.4.orig/library/devname.c procps-ng-4.0.4/library/devname.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/library/devname.c 2023-07-11 11:09:18.436786212 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/library/devname.c 2024-08-13 11:40:55.012140114 +0200
|
|
|
045308 |
@@ -287,7 +287,7 @@
|
|
|
045308 |
struct stat sbuf;
|
|
|
045308 |
char path[32];
|
|
|
045308 |
ssize_t count;
|
|
|
045308 |
- const int len = snprintf(path, sizeof path, "/proc/%d/%s", pid, name); /* often permission denied */
|
|
|
045308 |
+ const int len = snprintf(path, sizeof path, "/proc/sysproc/%d/%s", pid, name); /* often permission denied */
|
|
|
045308 |
if(len <= 0 || (size_t)len >= sizeof path) return 0;
|
|
|
045308 |
count = readlink(path,buf,TTY_NAME_SIZE-1);
|
|
|
045308 |
if(count <= 0 || count >= TTY_NAME_SIZE-1) return 0;
|
|
|
045308 |
@@ -305,7 +305,7 @@
|
|
|
045308 |
char path[32];
|
|
|
045308 |
FILE *fp;
|
|
|
045308 |
char *lf;
|
|
|
045308 |
- sprintf (path, "/proc/%d/ctty", pid); /* often permission denied */
|
|
|
045308 |
+ sprintf (path, "/proc/sysproc/%d/ctty", pid); /* often permission denied */
|
|
|
045308 |
fp = fopen (path, "r");
|
|
|
045308 |
if (!fp)
|
|
|
045308 |
return 0;
|
|
|
045308 |
diff -ru procps-ng-4.0.4.orig/library/readproc.c procps-ng-4.0.4/library/readproc.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/library/readproc.c 2023-07-11 11:09:18.436786212 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/library/readproc.c 2024-08-13 11:38:26.689488350 +0200
|
|
|
045308 |
@@ -1389,7 +1389,7 @@
|
|
|
045308 |
p->tgid = strtoul(ent->d_name, NULL, 10);
|
|
|
045308 |
if (errno == 0) {
|
|
|
045308 |
p->tid = p->tgid;
|
|
|
045308 |
- snprintf(path, PROCPATHLEN, "/proc/%d", p->tgid);
|
|
|
045308 |
+ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d", p->tgid);
|
|
|
045308 |
return 1;
|
|
|
045308 |
}
|
|
|
045308 |
}
|
|
|
045308 |
@@ -1408,7 +1408,7 @@
|
|
|
045308 |
closedir(PT->taskdir);
|
|
|
045308 |
}
|
|
|
045308 |
// use "path" as some tmp space
|
|
|
045308 |
- snprintf(path, PROCPATHLEN, "/proc/%d/task", p->tgid);
|
|
|
045308 |
+ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d/task", p->tgid);
|
|
|
045308 |
PT->taskdir = opendir(path);
|
|
|
045308 |
if(!PT->taskdir) return 0;
|
|
|
045308 |
PT->taskdir_user = p->tgid;
|
|
|
045308 |
@@ -1421,7 +1421,7 @@
|
|
|
045308 |
t->tid = strtoul(ent->d_name, NULL, 10);
|
|
|
045308 |
t->tgid = p->tgid;
|
|
|
045308 |
//t->ppid = p->ppid; // cover for kernel behavior? we want both actually...?
|
|
|
045308 |
- snprintf(path, PROCPATHLEN, "/proc/%d/task/%.10s", p->tgid, ent->d_name);
|
|
|
045308 |
+ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d/task/%.10s", p->tgid, ent->d_name);
|
|
|
045308 |
return 1;
|
|
|
045308 |
}
|
|
|
045308 |
|
|
|
045308 |
@@ -1435,7 +1435,7 @@
|
|
|
045308 |
char *path = PT->path;
|
|
|
045308 |
|
|
|
045308 |
if (pid) {
|
|
|
045308 |
- snprintf(path, PROCPATHLEN, "/proc/%d", pid);
|
|
|
045308 |
+ snprintf(path, PROCPATHLEN, "/proc/sysproc/%d", pid);
|
|
|
045308 |
p->tid = p->tgid = pid; // this tgid may be a huge fib |
|
|
|
045308 |
|
|
|
045308 |
/* the 'status' directory is the only place where we find the |
|
|
|
045308 |
diff -ru procps-ng-4.0.4.orig/src/pidof.c procps-ng-4.0.4/src/pidof.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/src/pidof.c 2023-08-15 13:02:25.783784823 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/src/pidof.c 2024-08-13 11:31:47.634655407 +0200
|
|
|
045308 |
@@ -124,7 +124,7 @@
|
|
|
045308 |
ssize_t path_alloc_size;
|
|
|
045308 |
ssize_t len;
|
|
|
045308 |
|
|
|
045308 |
- snprintf(link, sizeof(link), "/proc/%d/%s", pid, base_name);
|
|
|
045308 |
+ snprintf(link, sizeof(link), "/proc/sysproc/%d/%s", pid, base_name);
|
|
|
045308 |
|
|
|
045308 |
len = path_alloc_size = 0;
|
|
|
045308 |
result = NULL;
|
|
|
045308 |
diff -ru procps-ng-4.0.4.orig/src/pmap.c procps-ng-4.0.4/src/pmap.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/src/pmap.c 2023-08-15 12:43:38.772140122 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/src/pmap.c 2024-08-13 11:28:36.375534274 +0200
|
|
|
045308 |
@@ -554,11 +554,11 @@
|
|
|
045308 |
printf("%u: %s\n", PIDS_VAL(tgid, s_int, p, Pids_info), PIDS_VAL(cmdline, str, p, Pids_info));
|
|
|
045308 |
|
|
|
045308 |
if (x_option || X_option || c_option) {
|
|
|
045308 |
- snprintf(buf, sizeof buf, "/proc/%u/smaps", PIDS_VAL(tgid, s_int, p, Pids_info));
|
|
|
045308 |
+ snprintf(buf, sizeof buf, "/proc/sysproc/%u/smaps", PIDS_VAL(tgid, s_int, p, Pids_info));
|
|
|
045308 |
if ((fp = fopen(buf, "r")) == NULL)
|
|
|
045308 |
return 1;
|
|
|
045308 |
} else {
|
|
|
045308 |
- snprintf(buf, sizeof buf, "/proc/%u/maps", PIDS_VAL(tgid, s_int, p, Pids_info));
|
|
|
045308 |
+ snprintf(buf, sizeof buf, "/proc/sysproc/%u/maps", PIDS_VAL(tgid, s_int, p, Pids_info));
|
|
|
045308 |
if ((fp = fopen(buf, "r")) == NULL)
|
|
|
045308 |
return 1;
|
|
|
045308 |
}
|
|
|
045308 |
diff -ru procps-ng-4.0.4.orig/src/ps/global.c procps-ng-4.0.4/src/ps/global.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/src/ps/global.c 2023-08-16 00:54:03.759538026 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/src/ps/global.c 2024-08-13 11:25:38.536358536 +0200
|
|
|
045308 |
@@ -176,7 +176,7 @@
|
|
|
045308 |
const char *bsd_v_format = (const char *)0xdeadbeef;
|
|
|
045308 |
int bsd_c_option = -1;
|
|
|
045308 |
int bsd_e_option = -1;
|
|
|
045308 |
-unsigned cached_euid = 0xffffffff;
|
|
|
045308 |
+uid_t cached_euid = 0xffffffff;
|
|
|
045308 |
int cached_tty = -1;
|
|
|
045308 |
char forest_prefix[4 * 32*1024 + 100]; // FIXME
|
|
|
045308 |
int forest_type = -1;
|
|
|
045308 |
diff -ru procps-ng-4.0.4.orig/src/pwdx.c procps-ng-4.0.4/src/pwdx.c
|
|
|
045308 |
--- procps-ng-4.0.4.orig/src/pwdx.c 2023-07-11 11:09:18.464787022 +0200
|
|
|
045308 |
+++ procps-ng-4.0.4/src/pwdx.c 2024-08-13 11:31:25.734756041 +0200
|
|
|
045308 |
@@ -53,8 +53,8 @@
|
|
|
045308 |
long pid;
|
|
|
045308 |
char *end = NULL;
|
|
|
045308 |
|
|
|
045308 |
- if (!strncmp("/proc/", input, 6))
|
|
|
045308 |
- skip = 6;
|
|
|
045308 |
+ if (!strncmp("/proc/sysproc/", input, 14))
|
|
|
045308 |
+ skip = 14;
|
|
|
045308 |
errno = 0;
|
|
|
045308 |
pid = strtol(input + skip, &end, 10);
|
|
|
045308 |
|
|
|
045308 |
@@ -122,7 +122,7 @@
|
|
|
045308 |
* the first char is possible
|
|
|
045308 |
*/
|
|
|
045308 |
if (argv[i][0] != '/')
|
|
|
045308 |
- snprintf(buf, buflen, "/proc/%s/cwd", argv[i]);
|
|
|
045308 |
+ snprintf(buf, buflen, "/proc/sysproc/%s/cwd", argv[i]);
|
|
|
045308 |
else
|
|
|
045308 |
snprintf(buf, buflen, "%s/cwd", argv[i]);
|
|
|
045308 |
|