Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2002 11:20:26 -0800
From:      "Jason K.Fritcher" <jkf@wolfnet.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/35894: popen.c in cron won't build without LOGIN_CAP defined
Message-ID:  <E16lam2-000IBI-00@outreach.wolfnet.org>

next in thread | raw e-mail | index | archive | help

>Number:         35894
>Category:       bin
>Synopsis:       popen.c in cron won't build without LOGIN_CAP defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 14 12:30:00 PST 2002
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16lam2-000IBI-00>