Crontab accepts files with no newline before EOL/EOF. Cron ignores file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cron (CentOS) |
New
|
Undecided
|
Unassigned | ||
cron (Ubuntu) |
Fix Released
|
Medium
|
Nick_Hill | ||
Bug Description
Binary package hint: cron
Install a default editor which doesn't automatically enter a newline before EOF such as Jed or vi. (nano adds newline).
Add a user's crontab using crontab -e. Omit newline at end of file.
Actual behaviour:
Crontab installs the user's crontab. Crontab does not complain the user's crontab has no new line at end of file.
Check to see if any of the user's cron tasks run. None run.
Edit user's crontab again, adding new line at end of crontab. Check to see if any user's cron tasks run. All seem to run OK.
Expected behaviour:
Crontab should complain the file it is installing has no new line at end of file, or should install new line silently.
This behaviour has been verified on irc.freenode.
Affects: All versions of Vixiecron. All versions of Ubuntu.
Related branches
CVE References
Changed in cron: | |
status: | Unconfirmed → Confirmed |
Changed in cron: | |
importance: | Undecided → Medium |
status: | Confirmed → Triaged |
Changed in cron: | |
assignee: | nobody → nick-nickhill |
status: | Triaged → In Progress |
Additional information.
setting EDITOR=/usr/bin/vi and exporting
then running crontab -e will allow you to create a usable cron file