Set the umask to 0077 when running verify on the minion log file to ensure that log file is created with 0600 if it does not already exist.

This commit is contained in:
Mike Place 2014-02-06 12:27:51 -07:00
parent c8ff6e8a46
commit 13a0174609

View File

@ -183,7 +183,9 @@ class Minion(parsers.MinionOptionParser):
'udp://', 'udp://',
'file://')): 'file://')):
# Logfile is not using Syslog, verify # Logfile is not using Syslog, verify
current_umask = os.umask(0077)
verify_files([logfile], self.config['user']) verify_files([logfile], self.config['user'])
os.umask(current_umask)
except OSError as err: except OSError as err:
sys.exit(err.errno) sys.exit(err.errno)