Red Hat Bugzilla – Bug 85879
Allow root to use 'crontab -u userid' even if cron.allow prohibits it
Last modified: 2007-04-18 12:51:56 EDT
Description of problem:
If a user isn't listed in cron.allow, but has a crontab entry *anyhow*, you
can't use crontab -u to work with that crontab.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add user to cron.allow, add a crontab, then remove the user from cron.allow
2. crontab -l -u user
3. This fails to work even for root.
# crontab -l -u testuser
You (testuser) are not allowed to use this program (crontab)
See crontab(1) for more information
A possible patch is appended.
Created attachment 90539 [details]
patch to cron misc.c to allow root to use -u flag
Here's a possible code fix for the enhancement.
Looks good to me, thanks for the patch, Valdis.
Patch should be in vixie-cron-3.0.1-75. Thanks.