From f88fed206029c989759ada7842452afe24cf38f2 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. --- library/system/cron | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/system/cron b/library/system/cron index 81e411168b..04dd065db0 100644 --- a/library/system/cron +++ b/library/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: