From leres@ee.lbl.gov  Thu Feb 26 19:23:01 2009
Return-Path: <leres@ee.lbl.gov>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7DAC21065863
	for <freebsd-gnats-submit@freebsd.org>; Thu, 26 Feb 2009 19:23:01 +0000 (UTC)
	(envelope-from leres@ee.lbl.gov)
Received: from fun.ee.lbl.gov (fun.ee.lbl.gov [131.243.2.202])
	by mx1.freebsd.org (Postfix) with ESMTP id 54A1C8FC0A
	for <freebsd-gnats-submit@freebsd.org>; Thu, 26 Feb 2009 19:23:01 +0000 (UTC)
	(envelope-from leres@ee.lbl.gov)
Received: from ice.ee.lbl.gov (ice.ee.lbl.gov [131.243.2.210])
	(authenticated bits=0)
	by fun.ee.lbl.gov (8.14.3/8.14.3) with ESMTP id n1QJ7EWj064143
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <freebsd-gnats-submit@freebsd.org>; Thu, 26 Feb 2009 11:07:14 -0800 (PST)
Message-Id: <49A6E862.8010706@ee.lbl.gov>
Date: Thu, 26 Feb 2009 11:07:14 -0800
From: Craig Leres <leres@ee.lbl.gov>
To: freebsd-gnats-submit@freebsd.org
Subject: [PATCH] etc/crontab: HOME setting overrides

>Number:         132135
>Category:       conf
>Synopsis:       [PATCH] etc/crontab: HOME setting overrides
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 26 19:30:00 UTC 2009
>Closed-Date:    Sun Jul 05 06:29:35 UTC 2009
>Last-Modified:  Sun Jul  5 06:30:06 UTC 2009
>Originator:     Craig Leres
>Release:        FreeBSD 7.1-RELEASE i386
>Organization:
Lawrence Berkeley National Laboratory
>Environment:
	    FreeBSD hot.ee.lbl.gov 7.1-RELEASE FreeBSD 7.1-RELEASE #1: Tue Jan
27 19:59:30 PST 2009
leres@hot.ee.lbl.gov:/usr/src/7.1-RELEASE/sys/amd64/compile/LBLSMP  amd64

>Description:
	For some reason, a line to set HOME was added to the default
	crontab back in revision 1.2 (back in July 1994!) This
	breaks any scripts or programs that use HOME to reference
	the home directory of the current account.

	I did a little investigation as to why this wasn't a problem
	in my older 6.2-RELEASE systems; it looks like there is
	some code to prevent HOME in the crontab from overriding
	the value derived from the passwd file that is not in the
	7.1-RELEASE version of cron.

	In the end, I checked with Paul Vixie and he said, "yes
	that's a bug in freebsd's default crontab."

>How-To-Repeat:
	Add a crontab entry similar to this:

	    * * * * * leres echo $USER HOME is $HOME

	and then wait for email that says:

	    leres HOME is /var/log

	which is clearly wrong.

>Fix:
	The attached patch removes the offending line.

===================================================================
RCS file: RCS/crontab,v
retrieving revision 1.1
diff -u -r1.1 crontab
--- crontab	2009/02/26 19:03:36	1.1
+++ crontab	2009/02/26 19:03:39
@@ -4,7 +4,6 @@
 #
 SHELL=/bin/sh
 PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
-HOME=/var/log
 #
 #minute	hour	mday	month	wday	who	command
 #

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: brian 
State-Changed-When: Sun Jun 14 06:36:47 UTC 2009 
State-Changed-Why:  
Fixed in r194170.  I'll MFC in 3 weeks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132135 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/132135: commit references a PR
Date: Sun, 14 Jun 2009 06:37:33 +0000 (UTC)

 Author: brian
 Date: Sun Jun 14 06:37:19 2009
 New Revision: 194170
 URL: http://svn.freebsd.org/changeset/base/194170
 
 Log:
   Remove HOME= - this has surprised me several times in the past.
   
   PR:		132135
   Submitted by:	Craig Leres
   MFC after:	3 weeks
 
 Modified:
   head/etc/crontab
 
 Modified: head/etc/crontab
 ==============================================================================
 --- head/etc/crontab	Sun Jun 14 06:36:50 2009	(r194169)
 +++ head/etc/crontab	Sun Jun 14 06:37:19 2009	(r194170)
 @@ -4,7 +4,6 @@
  #
  SHELL=/bin/sh
  PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
 -HOME=/var/log
  #
  #minute	hour	mday	month	wday	who	command
  #
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: brian 
State-Changed-When: Sun Jul 5 06:28:43 UTC 2009 
State-Changed-Why:  
Fix merged to stable/7 - r195348 


Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Sun Jul 5 06:28:43 UTC 2009 
Responsible-Changed-Why:  
Fix merged to stable/7 - r195348 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132135 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/132135: commit references a PR
Date: Sun,  5 Jul 2009 06:28:38 +0000 (UTC)

 Author: brian
 Date: Sun Jul  5 06:28:23 2009
 New Revision: 195348
 URL: http://svn.freebsd.org/changeset/base/195348
 
 Log:
   MFC: Remove HOME=
   
   PR:		132135
 
 Modified:
   stable/7/etc/   (props changed)
   stable/7/etc/crontab
 
 Modified: stable/7/etc/crontab
 ==============================================================================
 --- stable/7/etc/crontab	Sun Jul  5 06:24:06 2009	(r195347)
 +++ stable/7/etc/crontab	Sun Jul  5 06:28:23 2009	(r195348)
 @@ -4,7 +4,6 @@
  #
  SHELL=/bin/sh
  PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
 -HOME=/var/log
  #
  #minute	hour	mday	month	wday	who	command
  #
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
