Skip to content

Commit cc3238c

Browse files
committed
Prevent unnecessary setuid call
1 parent 1aae54a commit cc3238c

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)