dcron
dcron copied to clipboard
Implement "system" crontabs, with documentation changes
dcron claims to support "system" crontabs, but differs in implementation to other crons by running jobs as root instead of allowing each job to have user specified.
Implement this behaviour, in the manner of anacron/vixie (RedHat) and FreeBSD.
Document the new behaviour.
Note that if the expectation is to be compatible with vendor-supplied cron.d scripts then more work may need to be done, as lines such as MAILTO= and PATH= are not supported by dcron.
On the way some necessary housekeeping was done:
-
Re-factored the file parsing into functions, so that error paths could be seen and reasoned more clearly. I needed to check this to insert error cases on the end.
-
Separated man page for "crontab" (command) and the file format and attempts to partition the page into subsections.
I kept the groundwork about as minimal as I could. Where patches are large, mostly they are moving existing code; the commit messages explain on a case-by-case basis.
I didn't verify the correctness or security of existing functionality such as how crond forks to run a user's task; just did my best to ensure it remained the same.
On the way I found the same compiler warning as everyone else; missing curly braces on an indentation block. I didn't want to stray into looking into this or verify its behavior, so I left it as is.
Thank you for the contributions. I've been away from this codebase for a while, as you saw. I started diving back into it a few months ago but life intervened. I will definitely pick it up again, but it will take a month or two.
Thanks. The target here is Alpine Linux, I may see if they are interested in patching it downstream for now, as this seems to put it out of line with other distribution. I'm not keen to be maintaining forks of tools like cron for our infrastructure. It could serve as some testing as well.
Great, Alpine is my distro of choice. I've been away from my Linux machine for a whole though.
On Fri, Jul 24, 2020, at 11:45 AM, hills wrote:
Thanks. The target here is Alpine Linux, I may see if they are interested in patching it downstream for now, as this seems to put it out of line with other distribution. I'm not keen to be maintaining forks of tools like cron for our infrastructure. It could serve as some testing as well.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dubiousjim/dcron/pull/30#issuecomment-663603262, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYVXTL6MGTSAGGBCSZ553R5GUBZANCNFSM4PGXQXSQ.
Alpine won't be patching downstream; they are keeping to integration patches, not adding new features. So I hope we can review soon and keep upstream moving.