]> granicus.if.org Git - procps-ng/commitdiff
library: disabled some code that now serves no purpose
authorJim Warner <james.warner@comcast.net>
Tue, 10 Aug 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Thu, 12 Aug 2021 11:34:11 +0000 (21:34 +1000)
In the patch shown below, two lines involving the flag
PROC_UID were uncommented (enabled). However given the
construct of the readeither function, it is impossible
for the simple_readtask guy to be called when its TGID
leader has already been ignored. So, let's disable it.

[ it's only now true that the lines serve no purpose ]
[ after the commit shown below tweaked readeither to ]
[ access the base directory of the tgid leader. but, ]
[ before that, the 2 lines should have been enabled! ]

Reference(s):
. two lines uncommented
commit af34cc964ae7667db15d2507f24098c26ba3c664
. tweaked readeither
commit a37526260917bac624ae6b75fd9f4ea7287d81ad

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/readproc.c

index 660450461e76ecaf3406f71b571fed07cefa3da9..f06be5ebec8126ec536a5382f389665c564e87de 100644 (file)
@@ -1248,8 +1248,8 @@ static proc_t *simple_readtask(PROCTAB *restrict const PT, proc_t *restrict cons
     if (stat(path, &sb) == -1)                  /* no such dirent (anymore) */
         goto next_task;
 
-    if ((flags & PROC_UID) && !XinLN(uid_t, sb.st_uid, PT->uids, PT->nuid))
-        goto next_task;                      /* not one of the requested uids */
+//  if ((flags & PROC_UID) && !XinLN(uid_t, sb.st_uid, PT->uids, PT->nuid))
+//      goto next_task;                      /* not one of the requested uids */
 
     t->euid = sb.st_uid;                        /* need a way to get real uid */
     t->egid = sb.st_gid;                        /* need a way to get real gid */