swap order of setuid and setgid
This commit is contained in:
parent
54873f51be
commit
defe40ee0c
@ -95,8 +95,8 @@ def drop_privileges(future):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
nobody = pwd.getpwnam('nobody')
|
nobody = pwd.getpwnam('nobody')
|
||||||
try:
|
try:
|
||||||
os.setuid(nobody.pw_uid)
|
|
||||||
os.setgid(nobody.pw_gid)
|
os.setgid(nobody.pw_gid)
|
||||||
|
os.setuid(nobody.pw_uid)
|
||||||
except PermissionError:
|
except PermissionError:
|
||||||
logging.error("Cannot setuid nobody; run as root")
|
logging.error("Cannot setuid nobody; run as root")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user