NetBSD Problem Report #47362

From root@panix.com  Mon Dec 24 17:07:07 2012
Return-Path: <root@panix.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 8C5DA63D82E
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 24 Dec 2012 17:07:07 +0000 (UTC)
Message-Id: <20121224170705.4E789C46BA@k1.nyc.access.net>
Date: Mon, 24 Dec 2012 12:07:04 -0500 (EST)
From: marcotte@panix.com
Reply-To: marcotte@panix.com
To: gnats-bugs@gnats.NetBSD.org
Subject: cron is too restrictive on file permissions
X-Send-Pr-Version: 3.95

>Number:         47362
>Category:       bin
>Synopsis:       cron is too restrictive on file permissions
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 24 17:10:00 +0000 2012
>Closed-Date:    Fri Sep 01 00:11:37 +0000 2017
>Last-Modified:  Fri Sep 01 00:11:37 +0000 2017
>Originator:     Brian Marcotte
>Release:        NetBSD 6.0
>Organization:
	Public Access Networks, Corp.
>Environment:
System: NetBSD k1.nyc.access.net 6.0 NetBSD 6.0 (PANIX-XEN-STD) #0: Sun Oct 14 15:57:33 EDT 2012 root@juggler.panix.com:/misc/obj/misc/devel/netbsd/6.0/src/sys/arch/i386/compile/PANIX-XEN-STD i386
Architecture: i386
Machine: i386
>Description:
We were getting these in the syslogs when we upgraded to NetBSD 6:

	(root) BAD FILE MODE (tabs/root)

The file is read-only because it is in RCS:

	-r--------  1 root  wheel  961 Mar 13  2012 /var/cron/tabs/root

I don't believe it's a security problem for the file to be read-only by
root. Cron should allow this mode.

>How-To-Repeat:

>Fix:
In src/external/bsd/cron/dist/database.c, process_crontab():

I'm not sure why "eqmode" is needed at all. It seems to me that just
setting "badmode" to 077 is enough (which may get changed to 022 if
fname is NULL).

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47362 CVS commit: src/external/bsd/cron/dist
Date: Mon, 24 Dec 2012 14:30:48 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Mon Dec 24 19:30:46 UTC 2012

 Modified Files:
 	src/external/bsd/cron/dist: database.c

 Log Message:
 PR/47362: Brian Marcotte: cron is too restrictive on file permissions
 Allow file being writable by owner.
 XXX: pullup to 6.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.8 src/external/bsd/cron/dist/database.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Brian Marcotte <marcotte@panix.com>
To: Christos Zoulas <christos@netbsd.org>
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: PR/47362 CVS commit: src/external/bsd/cron/dist
Date: Wed, 26 Dec 2012 18:28:13 -0500

 >  Modified Files:
 >  	src/external/bsd/cron/dist: database.c

 Works for me. Thanks!

 --
 - Brian

State-Changed-From-To: open->pending-pullups
State-Changed-By: ginsbach@NetBSD.org
State-Changed-When: Sat, 19 Aug 2017 22:02:32 +0000
State-Changed-Why:
Pullup request filed for netbsd-6.


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/47362 CVS commit: [netbsd-6] src/external/bsd/cron/dist
Date: Thu, 31 Aug 2017 15:14:56 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Thu Aug 31 15:14:56 UTC 2017

 Modified Files:
 	src/external/bsd/cron/dist [netbsd-6]: database.c

 Log Message:
 Pull up following revision(s) (requested by ginsbach in ticket #1498):
 	external/bsd/cron/dist/database.c: revision 1.8
 PR/47362: Brian Marcotte: cron is too restrictive on file permissions
 Allow file being writable by owner.
 XXX: pullup to 6.


 To generate a diff of this commit:
 cvs rdiff -u -r1.7 -r1.7.4.1 src/external/bsd/cron/dist/database.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: ginsbach@NetBSD.org
State-Changed-When: Fri, 01 Sep 2017 00:11:37 +0000
State-Changed-Why:
Pulled up to netbsd-6 (pullup-6 #1498).


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.