mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
drops suplemental groups when droping privileges.
fix issue spotted by Vangelis Koukis
This commit is contained in:
parent
16b62072cd
commit
634ccba7c3
@ -146,6 +146,9 @@ def set_owner_process(uid,gid):
|
||||
# groups like on osx or fedora
|
||||
os.setgid(-ctypes.c_int(-gid).value)
|
||||
|
||||
# Also drop supplemental groups
|
||||
os.setgroups([])
|
||||
|
||||
if uid:
|
||||
os.setuid(uid)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user