Post #2535079
2026-01-08 09:53 UTC
@david_chisnall@infosec.exchange @nblr@chaos.social i've seen this justified as 'the file could be truncated, and it could lead to badness', if e.g., a command like
0 0 * * * rm -r /tmp/daily-debug-logs/
got truncated after the first / (ignoring the modern --preserve-root behaviour of rm for simplicity).
Not complaining loudly to the logs when cron detects a malformed crontab is a crime if still true.
Replies (1)
-
@mgedmin@floss.social 2026-01-08 10:28
@david_chisnall@infosec.exchange @nblr@chaos.social > Not complaining loudly to the logs when cron detects a malformed crontab is a crime if still true. I looked at the source, and apparently Debian added a patch to report truncated crontabs back in either 2002 or 2010: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79037 (AFAICT the original 2002 fix was incorrect and it was fixed again, properly in 2010). I am sad that this was done in a distro patch and not pushed upstream. Is there an active upstream for cron?