mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Fixes UID bit test.
This commit is contained in:
parent
fc04a94dce
commit
20592f72c0
@ -129,8 +129,8 @@ def has_privileged_access(executable):
|
|||||||
if os.geteuid() == 0:
|
if os.geteuid() == 0:
|
||||||
# we are root, so we should have privileged access.
|
# we are root, so we should have privileged access.
|
||||||
return True
|
return True
|
||||||
if os.stat(executable).st_mode & stat.S_ISVTX == stat.S_ISVTX:
|
if os.stat(executable).st_mode & stat.S_ISUID:
|
||||||
# the executable has a sticky bit.
|
# the executable has set UID bit.
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# test if the executable has the CAP_NET_RAW capability (Linux only)
|
# test if the executable has the CAP_NET_RAW capability (Linux only)
|
||||||
|
Loading…
Reference in New Issue
Block a user