From owner-freebsd-bugs Thu Mar 14 12:30:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A2C0537B420 for ; Thu, 14 Mar 2002 12:30:00 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2EKU0w09562; Thu, 14 Mar 2002 12:30:00 -0800 (PST) (envelope-from gnats) 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 ; 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: Date: Thu, 14 Mar 2002 11:20:26 -0800 From: "Jason K.Fritcher" Reply-To: "Jason K.Fritcher" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/35894: popen.c in cron won't build without LOGIN_CAP defined Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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