From owner-freebsd-current@FreeBSD.ORG Wed Oct 6 17:50:10 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 571DC16A4CF; Wed, 6 Oct 2004 17:50:10 +0000 (GMT) Received: from smtp1.jazztel.es (smtp1.jazztel.es [62.14.3.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5843943D1D; Wed, 6 Oct 2004 17:50:07 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from antivirus by smtp1.jazztel.es with antivirus id 1CFFvi-0002IF-00 Wed, 06 Oct 2004 19:50:22 +0200 Received: from [212.106.254.137] (helo=rguez.homeunix.net) by smtp1.jazztel.es with esmtp id 1CFFvh-0002Hb-00 Wed, 06 Oct 2004 19:50:21 +0200 Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) by rguez.homeunix.net (8.13.1/8.13.1) with ESMTP id i96Ho4Xx084797; Wed, 6 Oct 2004 19:50:04 +0200 (CEST) (envelope-from josemi@freebsd.jazztel.es) Received: from localhost (localhost [[UNIX: localhost]]) by redesjm.local (8.13.1/8.13.1/Submit) id i96Ho1Bp002526; Wed, 6 Oct 2004 19:50:01 +0200 (CEST) (envelope-from josemi@freebsd.jazztel.es) X-Authentication-Warning: orion.redesjm.local: freebsd set sender to josemi@freebsd.jazztel.es using -f From: Jose M Rodriguez To: freebsd-current@freebsd.org Date: Wed, 6 Oct 2004 19:50:00 +0200 User-Agent: KMail/1.7 References: <20041002151123.J37762@carver.gumbysoft.com> In-Reply-To: <20041002151123.J37762@carver.gumbysoft.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_JBDZBJP6ttllhYz" Message-Id: <200410061950.01434.josemi@freebsd.jazztel.es> X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.27.0.12; VDF 6.27.0.81 (host: antares.redesjm.local) X-Virus-Scanned: by antivirus cc: current@freebsd.org Subject: Re: IFS pollution from localpkg X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2004 17:50:10 -0000 --Boundary-00=_JBDZBJP6ttllhYz Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sunday 03 October 2004 00:18, Doug White wrote: > Hey folks, > > I ran into a build problem on my amd64 box today, where ar was being > fed output from a backtick operation but the carriage returns weren't > being converted to spaces. After some gdb digging in sh, I found > that the reason for the problem was that IFS=" " was set in my shell > environment. > > Since I don't touch IFS in any of my shell dotfiles, and the system > shellfiles don't either, I think this may be coming from > /etc/rc.d/localpkg. It sets IFS just before calling the start script > for scripts in /usr/local/etc/rc.d/ and friends. I start kdm out of a > script there, and it probably inherits the environment, and it > propagates all the way up to my Konsole session where I was trying to > build world. > > Unsetting IFS made the buildworld continue past the prior point of > trouble. > > I'm not quite sure why this is only a problem on the amd64 machine -- > it was running a September 23 world, but is running KDE 3.3 instead > of KDE 3.2 like the other machines I have here. The system was also > built from scratch about that time, and the others have been around > for 6 months or more. > > I guess no one changes the script_name_sep rc.conf variable to > something more dangerous than the default space... > > Anyway, I think we should investigate running local package scripts > with IFS (and other hazardous variables) stripped using env. Or > perhaps not play with IFS at all unless the user sets > script_name_sep, and change the default accordingly. > > I'm not sure why this doesn't mess more stuff up :-/ If you are using KDE-3.3.0 an csh, this maybe your problem: http://www.freebsd.org/cgi/query-pr.cgi?pr=72388 Attached a simple patch agains Xsession -- josemi --Boundary-00=_JBDZBJP6ttllhYz Content-Type: text/x-diff; charset="iso-8859-1"; name="patch-Xsession" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="patch-Xsession" --- /usr/local/share/config/kdm/Xsession Sun Oct 3 23:37:47 2004 +++ /etc//X11/xdm/Xsession Wed Oct 6 18:14:49 2004 @@ -30,7 +30,7 @@ # [t]cshrc is always sourced automatically. # Note that sourcing csh.login after .cshrc is non-standard. set -a - eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login > /dev/null; if (-f ~/.login) source ~/.login > /dev/null; /bin/sh -c set | egrep -v "^(BASH_VERSINFO|EUID|PPID|UID|GROUPS|SHELLOPTS|_)="'` + eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login >& /dev/null; if (-f ~/.login) source ~/.login >& /dev/null; /usr/bin/env | egrep -v "^(TERM|SHLVL)="'` set +a ;; *) # Plain sh, ksh, and anything we don't know. --Boundary-00=_JBDZBJP6ttllhYz--