From 487aa9a1ecdee47c30dc3247df2d3b548bd18b7b Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Mon, 30 Sep 2013 13:20:06 -0400 Subject: [PATCH] Enforce umask for cron module, so cron_file generated files are 0644. Certain cron implementations get cranky if files in cron.* are group writable. --- system/cron | 2 ++ 1 file changed, 2 insertions(+) diff --git a/system/cron b/system/cron index 81e411168b7..04dd065db0b 100644 --- a/system/cron +++ b/system/cron @@ -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: