mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
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:
parent
c8ff6e8a46
commit
13a0174609
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user