1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Enforce umask for cron module, so cron_file generated files are 0644.

Certain cron implementations get cranky if files in cron.* are group
writable.
This commit is contained in:
Brian Harring 2013-09-30 13:20:06 -04:00
parent 9b5fb9ad6b
commit f88fed2060

View file

@ -426,6 +426,8 @@ def main():
changed = False
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)
if crontab.syslogging: