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

Certain cron implementations get cranky if files in cron.* are group
writable.
reviewable/pr18780/r1
Brian Harring 11 years ago
parent e1ff809d1a
commit 487aa9a1ec

@ -426,6 +426,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…
Cancel
Save