Bug 85879 - Allow root to use 'crontab -u userid' even if cron.allow prohibits it
Allow root to use 'crontab -u userid' even if cron.allow prohibits it
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: vixie-cron (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Brock Organ
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-03-10 01:47 EST by Valdis Kletnieks
Modified: 2007-04-18 12:51 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-07-02 04:41:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to cron misc.c to allow root to use -u flag (1.21 KB, patch)
2003-03-10 01:49 EST, Valdis Kletnieks
no flags Details | Diff

  None (edit)
Description Valdis Kletnieks 2003-03-10 01:47:21 EST
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):
vixie-cron-3.0.1-74

How reproducible:


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.
    
Actual results:
% su
Password: 
# crontab -l -u testuser
You (testuser) are not allowed to use this program (crontab)
See crontab(1) for more information

Expected results:


Additional info:
A possible patch is appended.
Comment 1 Valdis Kletnieks 2003-03-10 01:49:26 EST
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.
Comment 2 Jens Petersen 2003-03-19 01:59:40 EST
Looks good to me, thanks for the patch, Valdis.
Comment 3 Jens Petersen 2003-03-19 02:58:49 EST
Patch should be in vixie-cron-3.0.1-75.  Thanks.

Note You need to log in before you can comment on or make changes to this bug.