From f1aad95cd139205a1829c69f129900f9bc5345c1 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Tue, 10 Aug 2021 00:00:00 -0500 Subject: [PATCH] library: disabled some code that now serves no purpose 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 --- proc/readproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proc/readproc.c b/proc/readproc.c index 66045046..f06be5eb 100644 --- a/proc/readproc.c +++ b/proc/readproc.c @@ -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 */