From jkf@wolfnet.org  Thu Mar 14 11:20:45 2002
Return-Path: <jkf@wolfnet.org>
Received: from outreach.wolfnet.org (CBL-jkfritcher1-a.hs.earthlink.net [207.217.171.200])
	by hub.freebsd.org (Postfix) with ESMTP id 1F64337B416
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 14 Mar 2002 11:20:27 -0800 (PST)
Received: from jkf by outreach.wolfnet.org with local (Exim 3.34 #1)
	id 16lam2-000IBI-00
	for FreeBSD-gnats-submit@freebsd.org; Thu, 14 Mar 2002 11:20:26 -0800
Message-Id: <E16lam2-000IBI-00@outreach.wolfnet.org>
Date: Thu, 14 Mar 2002 11:20:26 -0800
From: Jason K.Fritcher <jkf@wolfnet.org>
Reply-To: Jason K.Fritcher <jkf@wolfnet.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: popen.c in cron won't build without LOGIN_CAP defined
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         35894
>Category:       bin
>Synopsis:       [patch] popen.c in cron won't build without LOGIN_CAP defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 14 12:30:00 PST 2002
>Closed-Date:    Sat Jun 09 18:55:35 GMT 2007
>Last-Modified:  Sat Jun 09 18:55:35 GMT 2007
>Originator:     Jason K. Fritcher
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD outreach.wolfnet.org 4.5-STABLE FreeBSD 4.5-STABLE #0: Thu Mar 7 18:03:11 PST 2002 jkf@outreach.wolfnet.org:/usr/obj/usr/src/sys/OUTREACH i386
>Description:
	When building cron without LOGIN_CAP defined, popen.c fails to build
because of a misplaced #if statement.
>How-To-Repeat:
	Comment out the CFLAG addition in src/usr.sbin/cron/cron/Makefile
and then run make.
>Fix:
	A fix was commited to src/usr.sbin/cron/cron/popen.c, rev 1.12, in
-current 5 weeks ago. Below is a patch that does what was done in rev 1.12.

--- src/usr.sbin/cron/cron/popen.c.orig	Mon Mar 11 17:57:06 2002
+++ src/usr.sbin/cron/cron/popen.c	Thu Mar 14 10:46:24 2002
@@ -150,12 +150,12 @@
 			(void)open(_PATH_DEVNULL, O_RDWR);
 			(void)close(pdes[1]);
 		}
-# if defined(LOGIN_CAP)
 		if (e != NULL) {
 			/* Set user's entire context, but skip the environment
 			 * as cron provides a separate interface for this
 			 */
 			usernm = env_get("LOGNAME", e->envp);
+# if defined(LOGIN_CAP)
 			if ((pwd = getpwnam(usernm)) == NULL)
 				pwd = getpwuid(e->uid);
 			lc = NULL;
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bbraun 
Responsible-Changed-By: roam 
Responsible-Changed-When: Fri Mar 15 00:31:01 PST 2002 
Responsible-Changed-Why:  
Over to Rob Braun, who committed the change in -CURRENT 
and will be most likely to have an MFC on his schedule :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35894 
Responsible-Changed-From-To: bbraun->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 13 05:48:35 GMT 2004 
Responsible-Changed-Why:  
With bugmeister hat on, reassign from recently inactive committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35894 
State-Changed-From-To: open->patched 
State-Changed-By: yar 
State-Changed-When: Tue Dec 14 13:46:12 GMT 2004 
State-Changed-Why:  
Mark this PR as `patched' to indicate that the bug it describes 
has been fixed in CURRENT (before RELENG_5 appearing), and so it 
applies to RELENG_4 only. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35894 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Sat Jun 9 18:55:08 UTC 2007 
State-Changed-Why:  
Fixed in all supported FreeBSD releases 

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