1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Relax permission check on OSX, it seem returning wrong info for setuid

This commit is contained in:
Julien Duponchelle 2016-12-19 09:28:27 +01:00
parent 8f6d25cc2b
commit f86358ad71
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -325,6 +325,10 @@ class BaseManager:
# do not check anything on Windows # do not check anything on Windows
return True return True
if sys.platform.startswith("darwin"):
if os.stat(executable).st_uid == 0:
return True
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