Subject: Re: SETUIDSCRIPTS problem...
To: Chris G. Demetriou <cgd@sibyte.com>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-users
Date: 12/29/2000 12:01:44
>From the comment in the source (exec_script.c):
>
>        /*
>         * if the script isn't readable, or it's set-id, then we've 
>         * gotta supply a "/dev/fd/..." for the shell to read.
>         * Note that stupid shells (csh) do the wrong thing, and
>         * close all open fd's when the start.  That kills this
>         * method of implementing "safe" set-id and x-only scripts.
>         */ 
>
>tcsh appears to be, in this way, as stupid as csh.

csh and tcsh also (unless this has been changed since last i checked)
will exit if they appear to be running setuid.  they don't seem to
give you a chance to do anything "wrong".

for what it's worth, "the proper quoting" will usually get you what
you want, but i've found some tasks easier with a csh script than a sh
script.

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."