Subject: Re: Setreuid in perl-4.036
To: None <kenh@wrl.EPI.COM,,>
From: Mark P. Gooderum <>
List: current-users
Date: 07/21/1994 16:04:05
> Sorry, this isn't correct.
> The attributes ARE modified between the saving and what you call resetting.
> Note that there is a recursice call to check_exec about 20 lines above the
> code mentioned above. This routine changes the attributes from that of the
> script to that of the interpreter. The intent of this so-called reset is that
> the original caller of the check_exec gets attributes that describe the
> intended effective uid and gid of the exec.

I missed this.  I had scanned check_exec() once but hadn't looked closely 

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's certainly not

Another interesting check might be that maybe there should be an error if
FDSCRIPTS is set and FDESCFS isn't, since you certainly can't pass a valid
/dev/fd/N if you don't have FDESCFS.

Does anybody have any kind of documentation on all the kernel options?
There seem to be some pretty major ones that don't even get mentioned in
ALL, like DIAGNOSTICS.  Also, I noticed some references to old options
when I started browsing the source in more detail (for instance there are
still lots of refs to LFS and AFS around).