Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 163881

Summary: Cron no longer allows read-only crontabs, enforces write access
Product: Red Hat Enterprise Linux 4 Reporter: Jason Vas Dias <jvdias>
Component: vixie-cronAssignee: Jason Vas Dias <jvdias>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2005-361 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-05 12:34:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 142953    
Bug Blocks: 156322    

Description Jason Vas Dias 2005-07-21 19:25:52 UTC
+++ This bug was initially created as a clone of Bug #142953 +++

Description of problem:
In previous releases of FC it was possible to have r/o crontab files,
for example an rpm which needs cron entries might drop a file
into /etc/cron.d/my-package which was mode 444 or similar.

This no longer works - the check in database.c around line 260
has the following code:-
	if ((statbuf->st_mode & 07733) != 0600) {
		log_it(fname, getpid(), "BAD FILE MODE", tabname);
		goto next_crontab;
	}
which *enforces* the owner write bit.

Although it may not be good practice to make these r/o (I would be
prepared to argue this point), enforcing writability seems
counter-intuitive, especially when you end up reading the damn source
code to find out just what is wrong :-)

Version-Release number of selected component (if applicable):
vixie-cron-4.1-19

How reproducible:
Every time

Steps to Reproduce:
1. install -m444 mycrontab /etc/cron.d/mycrontab
2. look at output in /var/log/cron

Additional info:

Comment 1 Jason Vas Dias 2005-07-21 20:55:37 UTC
Fixed for bug Bug #142953 with vixie-cron-4.1-36.EL4.

Comment 6 Red Hat Bugzilla 2005-10-05 12:34:53 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-361.html