Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider setting mtime to 1 instead of 0 to workaround logic bugs in other apps? #2662

Closed
srd424 opened this issue Jun 25, 2022 · 2 comments
Closed

Comments

@srd424
Copy link

srd424 commented Jun 25, 2022

I've just been bitten by this bug in cron which causes it not to load any crontab entries if the mtime of /etc/crontab and /var/spool/crontab are both 0:

https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1773229

It's the sort of logic bug which I can easily imagine existing in other software too - is it worth setting the mtime to 1 instead of 0, or is there a particular reason why 0 is important?

@srd424
Copy link
Author

srd424 commented Jun 25, 2022

(For completeness, #1469 and links from there document the original decision to set all files to 0.)

@cgwalters
Copy link
Member

I've just been bitten by this bug in cron which causes it not to load any crontab entries if the mtime of /etc/crontab and /var/spool/crontab are both 0:

Ah, ouch. You might consider using systemd timers instead FWIW.

is it worth setting the mtime to 1 instead of 0, or is there a particular reason why 0 is important?

We had to pick a value. I don't think we can really easily change it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants