develooper Front page | perl.perl5.porters | Postings from February 2011

Re: setuid and serious trouble (Re: Time to update

Thread Previous | Thread Next
Mark Overmeer
February 3, 2011 09:02
Re: setuid and serious trouble (Re: Time to update
Message ID:
* Leon Timmermans ( [110203 16:50]:
> On Thu, Feb 3, 2011 at 5:29 PM, Mark Overmeer <> wrote:
> > It would be very unexpected to see  setreuid($uid, -1)  do something
> > different than  setuid($uid).  The former is to avoid race-conditions
> > when uid and euid both have to change.
> setuid changes either *all uids* or just the euid, but never only the
> ruid. See [1] for an explanation.

My previous message was sent under presure of diner. Now, during diner, I
see you are right: there is a chance that people want to use the old
setuid instead of the more flexible setreuid.  The manual should point
people to use $<, but the code should provide an old-fashioned setuid
for compatibility sake.

       Mark Overmeer MSc                                MARKOV Solutions                         

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About