From nobody@FreeBSD.org  Thu Aug  1 11:42:49 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id C105B37B400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  1 Aug 2002 11:42:49 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7AC9443E42
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  1 Aug 2002 11:42:49 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g71IgnOT045875
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 1 Aug 2002 11:42:49 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g71Ignka045874;
	Thu, 1 Aug 2002 11:42:49 -0700 (PDT)
Message-Id: <200208011842.g71Ignka045874@www.freebsd.org>
Date: Thu, 1 Aug 2002 11:42:49 -0700 (PDT)
From: Pat Lashley <patl+freebsd@volant.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: periodic scripts make unwarrented assumptions about PATH
X-Send-Pr-Version: www-1.0

>Number:         41242
>Category:       conf
>Synopsis:       periodic(8) scripts make unwarranted assumptions about PATH
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 01 11:50:01 PDT 2002
>Closed-Date:    Fri Aug 20 09:14:09 UTC 2010
>Last-Modified:  Fri Aug 20 09:14:09 UTC 2010
>Originator:     Pat Lashley
>Release:        4.6-STABLE
>Organization:
>Environment:
FreeBSD orwell.phoenix.volant.org 4.6-STABLE FreeBSD 4.6-STABLE #11: Wed Jul 24 09:47:43 PDT 2002     broot@orwell.phoenix.volant.org:/usr/obj/usr/src/sys/ORWELL  i386
>Description:
The scripts in /etc/periodic/* invoke various system programs using just
the program name without a path.  Since periodic is normally run from
cron, and /etc/crontab sets a short PATH, this is normally safe.  But
when run manually the PATH may contain other elements which could cause
unexpected conflicts.  (For example, daily/450.security re-invokes
periodic.  If /usr/X11/bin appears before /usr/sbin and OpenMotif is
installed it will try to display the Periodic Table of Motif Widgets
instead of executing the scripts in /etc/periodic/security.)
>How-To-Repeat:
Install OpenMotif from the port.  Prepend /usr/X11R6/bin to your PATH.
Run "periodic daily".  Run "/usr/sbin/periodic daily".
>Fix:
Since the individual periodic scripts may also be run manually, the best
fix is to add a full path to every program invocation in /usr/sbin/periodic
and the scripts in /etc/periodic/*
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: vwe 
State-Changed-When: Fri Aug 20 09:09:09 UTC 2010 
State-Changed-Why:  
Pat, 
it seems like noone cared much about the issue you filed in 8 years now. 
To me it looks like you screwed up your PATH and thus you cannot expect to 
start the right binaries if you do this. For periodic /etc/crontab is the right 
place to set PATH. 
For a user .profile or .cshrc it's not recommended to screw up PATH that way. 
You may risk a lot of problems more, not just with periodic and it's scripts. 
As I don't think there's much room for an official fix to change this, I'm closing this PR. 
I'll be happy to re-open this PR if there's a chance to have this solved cleanly. 


Responsible-Changed-From-To: freebsd-bugs->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Fri Aug 20 09:09:09 UTC 2010 
Responsible-Changed-Why:  
track 

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