Subject: Re: pkgsrc and tcsh
To: NetBSD/sparc Discussion List <port-sparc@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 05/28/2002 13:45:56
[ On Tuesday, May 28, 2002 at 18:27:39 (+0100), David Laight wrote: ]
> Subject: Re: pkgsrc and tcsh
>
> Anyone know why netbsd defaults root to csh?

extremely ancient history, perhaps some personal prejudice, and no doubt
a small dose of desire for convenience, I suspect....  Much the same
reasons my master.passwd gives /bin/ksh for root's shell....  :-)

src/etc/master.passwd has come from CSRG that way since at least 4.3net2

> Even the man page suggests it is completly inappropraite
> for scripts - IIRC 'cos the quoting rules are broken.

Huh?

Having root's shell be /bin/csh causes no end of trouble on systems
without interpreter file support in exec*(2), but on *BSD it should
always be OK, provided all the scripts that might ever be run as root
contain the right magic number.  Been there -- done that....  :-)

csh is inappropriate for scripts because it implements a _REALLY_ bad
programming language with any number of misfeatures and missing
features.  Completely stupid and broken quoting rules is only one
problem, though indeed it's a pretty critical problem when it comes to
dealing safely with filenames containing whitespace and other "special"
characters....  I don't agree with Tom Christiansen on a whole lot of
subjects, but I definitely echo his sentiments about csh:

	http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/

> A traditional 'feature free' bourne shell is probably
> more secure - it can't do anything too unexpected!

hmmmm.....

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>