From 7f9f10e721a875d5caa330baeee42a3895f588e2 Mon Sep 17 00:00:00 2001 From: "H. Witsch" Date: Mon, 18 Mar 2024 13:45:59 +0100 Subject: [PATCH] ESRF addition to creating processes with all GIDs. At ESRF we need data acquisition process to create files with read and write permissions for all groups of the user. --- supervisor/options.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/supervisor/options.py b/supervisor/options.py index 271735200..bdbdf3355 100644 --- a/supervisor/options.py +++ b/supervisor/options.py @@ -1387,8 +1387,10 @@ def drop_privileges(self, user): gid = pwrec[3] if hasattr(os, 'setgroups'): user = pwrec[0] - groups = [grprec[2] for grprec in grp.getgrall() if user in - grprec[3]] + # ESRF addition to creating processes with all GIDs. + # groups = [grprec[2] for grprec in grp.getgrall() if user in + # grprec[3]] + groups = os.getgrouplist(user, pwrec[3]) # always put our primary gid first in this list, otherwise we can # lose group info since sometimes the first group in the setgroups