[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

system/3807: Enhancement to cron daemon



>Number:         3807
>Category:       system
>Synopsis:       cron will not use /etc/crontab which has mode 0400
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 03 17:40:02 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Walt Howard
>Release:        cron 1.32, database.c 1.13
>Organization:
University of Alberta
>Environment:
	System      : OpenBSD 3.5
	Architecture: OpenBSD.sparc64
	Machine     : sparc64
>Description:
	At line 211 of database.c, the mode of a crontab file is checked to
	verify that it is 0600.  We shouldn't really care if it is
	owner-writable.  If /etc/crontab is managed with RCS, it won't be
	owner-writable.  So the test
	((statbuf->st_mode & 07777) != 0600)
	should instead be
	((statbuf->st_mode & 07577) != 0400)
>How-To-Repeat:
	Create /etc/crontab; chmod 0400 /etc/crontab
	Observe complaint about BAD FILE MODE in /var/cron/log.
>Fix:
	As above.  Mask out the owner-write bit in the test of file mode.


>Release-Note:
>Audit-Trail:
>Unformatted: