Subject: Re: Addition to force open to open only regular files
To: None <dolecek@ibis.cz, imp@village.org>
From: Chris Torek <torek@BSDI.COM>
List: tech-kern
Date: 11/26/2000 11:34:58
For what it is worth, BSD/OS's "compat setreuid" code fakes the
whole thing out:
/*
* If requested ruid == euid, this is effectively a call to setuid.
*/
and:
/*
* Partially emulate old setreuid usage of exchanging ruid and euid.
* We assume that the intent of setting ruid is to be able to get
* back setuid privilege. So we make sure that we will be able to
* do so, but do not actually set the ruid.
*/
Other setreuid() syscalls are rejected; this last one is turned into
a seteuid() as needed.
Chris