From 32992a88f9a66a99851334ba3a266ce1bc7474e9 Mon Sep 17 00:00:00 2001 From: Andy Wilcox Date: Tue, 2 Jan 2018 13:12:12 -0800 Subject: [PATCH] Avoid needlessly triggering non-false return from issetugid on MacOSX --- gunicorn/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/util.py b/gunicorn/util.py index e73d3502..a7d5514a 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -161,7 +161,7 @@ def set_owner_process(uid, gid, initgroups=False): if initgroups: os.initgroups(username, gid) - else: + elif gid != os.getgid(): os.setgid(gid) if uid: