On Thu, Dec 01, 2005 at 11:05:44AM -0700, M. Warner Losh wrote: > In message: <[EMAIL PROTECTED]> > Ruslan Ermilov <[EMAIL PROTECTED]> writes: > : On Thu, Dec 01, 2005 at 05:08:56PM +0000, Warner Losh wrote: > : > imp 2005-12-01 17:08:56 UTC > : > > : > FreeBSD src repository > : > > : > Modified files: > : > . Makefile.inc1 > : > Log: > : > In make buildenv, spell sh as ${SHELL}. In this case, we don't want > : > to hard code /bin/sh since we're forking it for the user to type > : > commands into. As such, ${SHELL} is the preferred thing users type > : > commands into. > : > > : > Revision Changes Path > : > 1.524 +1 -1 src/Makefile.inc1 > : > > : Please consider backing it out. In this case, we want to hard code it > : to "sh" since the stock ~root/.cshrc always resets $PATH, which breaks > : "make buildenv" for root (which most of us use). Testcase: "which cc" > : from under "make buildenv" shell. > > This is an insufficient reason to hard code it to sh. My .cshrc files > are written properly and make buildenv works. We should consider > fixing ~root/.cshrc instead to do the right thing with its path. What > would be wrong with > > Index: dot.cshrc > =================================================================== > RCS file: /home/ncvs/src/etc/root/dot.cshrc,v > retrieving revision 1.29 > diff -u -r1.29 dot.cshrc > --- dot.cshrc 1 Apr 2004 19:28:00 -0000 1.29 > +++ dot.cshrc 1 Dec 2005 18:04:01 -0000 > @@ -14,7 +14,7 @@ > # A righteous umask > umask 22 > > -set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin /usr/X11R6/bin $HOME/bin) > +set path = ($path /sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin > /usr/local/bin /usr/X11R6/bin $HOME/bin) > > setenv EDITOR vi > setenv PAGER more > > I hate enteracting with a sh prompt... > I hate it too, but I think the PATH setting for root might have its roots in security (it's not clear from CVS history). For example, as a user, I have "." in my PATH, but I would prefer NOT to have it while I'm su'ing to root.
Until we decide how to properly do it, I think unbreaking "buildenv" for the standard case would be polite. Cheers, -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer
pgpscFLvHJRJa.pgp
Description: PGP signature