Subject: Re: Setreuid in perl-4.036
To: None <mark@aggregate.com>
From: Wolfgang Solfrank <ws@tools.de>
List: current-users
Date: 07/21/1994 23:42:40
> This raises an interesting issue. Unless SETUIDSCRIPTS is set for the
> kernel, setuid scripts don't setuid at all. There are good reasons for
> this but it seems a major deviation from common Unix to be undocumented
> (the code comments don't mention this, no man page does, it doesn't
> even show up in ALL (maybe should be LOTS anyways...it's certainly not
> ALL)).
Yes, this is the reason I named this flag thusly :-) (you want to have scripts
that honor setuid).
Note, that apart from the mangling of defines at the start of exec_script.c,
the two flags SETUIDSCRIPTS and FDSCRIPTS are pretty much orthogonal. You
could have one without the other, which would have the following effects:
SETUIDSCRIPTS FDSCRIPTS effect on scripts
undefined undefined no setuid
no exec if exec-only
defined undefined setuid with the wellknown security hole
no exec if exec-only
undefined defined no setuid
can execute exec-only scripts
defined defined safer setuid scripts
can execute exec-only scripts
Note, that with FDSCRIPTS defined, scripts using this feature, i.e. setuid
and/or exec-only scripts, loose the ability to get at their filename ($0 in
the shell).
--
ws@TooLs.DE (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
------------------------------------------------------------------------------