From mwm@mired.org  Tue Sep 19 01:44:20 2000
Return-Path: <mwm@mired.org>
Received: from guru.mired.org (zoom0-075.telepath.com [216.14.0.75])
	by hub.freebsd.org (Postfix) with SMTP id A6A7E37B422
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Sep 2000 01:44:15 -0700 (PDT)
Received: (qmail 7695 invoked by uid 100); 19 Sep 2000 08:43:39 -0000
Message-Id: <20000919084339.7694.qmail@guru.mired.org>
Date: 19 Sep 2000 08:43:39 -0000
From: mwm@mired.org
Reply-To: mwm@mired.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Periodic is no longer usable by non-root users
X-Send-Pr-Version: 3.2

>Number:         21395
>Category:       bin
>Synopsis:       Periodic is no longer usable by non-root users
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 19 01:50:01 PDT 2000
>Closed-Date:    Tue Sep 19 15:15:15 PDT 2000
>Last-Modified:  Tue Sep 19 15:15:53 PDT 2000
>Originator:     Mike Meyer
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Meyer Consulting
>Environment:

	-current as of 9/16, with SMPNG. 

>Description:

	/usr/sbin/periodic writes it's temporary output files to
	/var/run. Not only does this not match the usage of /var/run
	in hier(9), it means that the periodic program can't be used
	by non-root users!

	Further, the default output is to send email to root. This
	makes it nearly useless for non-root users.

>How-To-Repeat:

	Create a periodic directory for some non-root user (in my
	case, the postgresql superuser was doing daily db maintenance
	with it). Then, as the appropriate user, invoke the periodic
	program on that directory. Note that you get no output with
	the default output setup.

	So change the setting of the _output variables to $USER in
	/etc/periodic.conf. Run periodic again. Notice that it now
	complains about not being able to create
	/var/run/periodic.#### for each file in the directory.

>Fix:

	Change the value of tmp_output in /usr/sbin/periodic from
	/var/run/periodic.$$ to /tmp/periodic.$$

	Change the value of three _output variables in
	/etc/defaults/periodic.conf to $USER. I have not tested this
	in /etc/defaults, but it does work in /etc/periodic.conf.


	


>Release-Note:
>Audit-Trail:

From: "Aleksandr A.Babaylov" <babolo@links.ru>
To: mwm@mired.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/21395: Periodic is no longer usable by non-root users
Date: Tue, 19 Sep 2000 16:30:54 +0400 (MSD)

 mwm@mired.org writes:
 > 
 > >Number:         21395
 > >Category:       bin
 > >Synopsis:       Periodic is no longer usable by non-root users
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Tue Sep 19 01:50:01 PDT 2000
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Mike Meyer
 > >Release:        FreeBSD 5.0-CURRENT i386
 > >Organization:
 > Meyer Consulting
 > >Environment:
 > 
 > 	-current as of 9/16, with SMPNG. 
 > 
 > >Description:
 > 
 > 	/usr/sbin/periodic writes it's temporary output files to
 > 	/var/run. Not only does this not match the usage of /var/run
 > 	in hier(9), it means that the periodic program can't be used
 > 	by non-root users!
 > 
 > 	Further, the default output is to send email to root. This
 > 	makes it nearly useless for non-root users.
 > 
 > >How-To-Repeat:
 > 
 > 	Create a periodic directory for some non-root user (in my
 > 	case, the postgresql superuser was doing daily db maintenance
 > 	with it). Then, as the appropriate user, invoke the periodic
 > 	program on that directory. Note that you get no output with
 > 	the default output setup.
 > 
 > 	So change the setting of the _output variables to $USER in
 > 	/etc/periodic.conf. Run periodic again. Notice that it now
 > 	complains about not being able to create
 > 	/var/run/periodic.#### for each file in the directory.
 > 
 > >Fix:
 > 
 > 	Change the value of tmp_output in /usr/sbin/periodic from
 > 	/var/run/periodic.$$ to /tmp/periodic.$$
 $TMPDIR/periodic.$$ if $TMPDIR exists and
 /tmp/periodic.$$ as fallback
 
 > 	Change the value of three _output variables in
 > 	/etc/defaults/periodic.conf to $USER. I have not tested this
 > 	in /etc/defaults, but it does work in /etc/periodic.conf.
 
 -- 
 @BABOLO      http://links.ru/
 
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: johan 
Responsible-Changed-When: Tue Sep 19 11:16:38 PDT 2000 
Responsible-Changed-Why:  
Brian has done alot of recent commits to periodic. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21395 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Tue Sep 19 15:15:15 PDT 2000 
State-Changed-Why:  
Output of periodic(8) now goes to stdout by default.  Temp files are 
stored in ${TMPDIR:-/tmp} 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21395 
>Unformatted:
