mirror of
https://github.com/Py-KMS-Organization/py-kms.git
synced 2025-05-13 06:34:45 -04:00
Fixed not dropping privileges to py-kms user by default
This commit is contained in:
parent
7f08d753e3
commit
2312a2d8ac
1 changed files with 4 additions and 6 deletions
|
@ -36,13 +36,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