mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-09 14:21:56 -04:00
Merge pull request #39 from gh0st-app1e/master
Fixed not dropping privileges to default user/group
This commit is contained in:
commit
c89f74a7ef
1 changed files with 4 additions and 6 deletions
|
@ -37,13 +37,11 @@ def change_uid_grp():
|
|||
os.chown(dbPath, new_uid, new_gid)
|
||||
loggersrv.debug("%s" %str(subprocess.check_output("ls -al " + dbPath, shell=True)))
|
||||
|
||||
if gid != new_gid:
|
||||
loggersrv.info("Setting gid to '%s'." % str(new_gid))
|
||||
os.setgid(gid)
|
||||
loggersrv.info("Setting gid to '%s'." % str(new_gid))
|
||||
os.setgid(new_gid)
|
||||
|
||||
if uid != new_uid:
|
||||
loggersrv.info("Setting uid to '%s'." % str(new_uid))
|
||||
os.setuid(uid)
|
||||
loggersrv.info("Setting uid to '%s'." % str(new_uid))
|
||||
os.setuid(new_uid)
|
||||
|
||||
|
||||
def change_tz():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue