Skip to content

Commit

Permalink
Fixed drop_privileges procedure.
Browse files Browse the repository at this point in the history
  • Loading branch information
yurivict committed May 15, 2015
1 parent 61ad1a5 commit ff36b3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tiny_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import os, pwd, grp, sys
import signal

def drop_privileges(uid_name, gid_name, files):
def drop_privileges3(uid_name, gid_name, files):
# get the uid/gid from the name
new_uid = pwd.getpwnam(uid_name).pw_uid
new_gid = grp.getgrnam(gid_name).gr_gid
Expand All @@ -25,7 +25,7 @@ def drop_privileges(uid_name, gid_name, files):
os.umask(0o077)

def drop_privileges(files):
drop_privileges('nobody', 'nogroup', files)
drop_privileges3('nobody', 'nogroup', files)

def do_daemonize(pid_file):
pid = os.fork()
Expand Down

0 comments on commit ff36b3f

Please sign in to comment.