IFS pollution from localpkg

Jose M Rodriguez josemi at freebsd.jazztel.es
Wed Oct 6 10:50:10 PDT 2004

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:


Attached a simple patch agains Xsession


-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-Xsession
Type: text/x-diff
Size: 712 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20041006/b3534314/patch-Xsession-0001.bin

More information about the freebsd-current mailing list