Merge pull request #39 from gh0st-app1e/master

Fixed not dropping privileges to default user/group
This commit is contained in:
simonmicro 2021-12-05 18:11:10 +01:00 committed by GitHub
commit c89f74a7ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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():