Skip to content

Commit 933b210

Browse files
authored
Merge pull request #2758 from dwarfmaster/master
Prevent unnecessary setuid call
2 parents 32b5daf + cc3238c commit 933b210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gunicorn/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def set_owner_process(uid, gid, initgroups=False):
145145
elif gid != os.getgid():
146146
os.setgid(gid)
147147

148-
if uid:
148+
if uid and uid != os.getuid():
149149
os.setuid(uid)
150150

151151

0 commit comments

Comments
 (0)