Replaced all getuid by geteuid
This commit is contained in:
parent
5d5032c41a
commit
7bccbc9a4e
2 changed files with 2 additions and 2 deletions
|
|
@ -168,7 +168,7 @@ class PowertopProfile:
|
|||
return "unknown"
|
||||
|
||||
def checkPrivs(self):
|
||||
myuid = os.getuid()
|
||||
myuid = os.geteuid()
|
||||
if myuid != 0:
|
||||
print >> sys.stderr, 'Run this program as root'
|
||||
return False
|
||||
|
|
|
|||
2
tuned.py
2
tuned.py
|
|
@ -64,7 +64,7 @@ if __name__ == "__main__":
|
|||
if (debug):
|
||||
log.setLevel("DEBUG")
|
||||
|
||||
if os.getuid() != 0:
|
||||
if os.geteuid() != 0:
|
||||
if daemonize:
|
||||
log.critical("Superuser permissions are needed.")
|
||||
sys.exit(1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue