mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4304 from ferringb/fixes/cron-permissions
Enforce umask for cron module, so cron_file generated files are 0644.
This commit is contained in:
commit
ec55268738
1 changed files with 2 additions and 0 deletions
|
@ -428,6 +428,8 @@ def main():
|
||||||
changed = False
|
changed = False
|
||||||
res_args = dict()
|
res_args = dict()
|
||||||
|
|
||||||
|
# Ensure all files generated are only writable by the owning user. Primarily relevant for the cron_file option.
|
||||||
|
os.umask(022)
|
||||||
crontab = CronTab(module, user, cron_file)
|
crontab = CronTab(module, user, cron_file)
|
||||||
|
|
||||||
if crontab.syslogging:
|
if crontab.syslogging:
|
||||||
|
|
Loading…
Reference in a new issue