Query about setuid()
Ron Natalie
ron at BRL-TGR
Mon Feb 11 06:59:32 AEST 1985
The VAX version is only valid for System V release 2 or later. Prior
to that it was always illegal to set the UID to something other than
the real uid if you were not the superuser. In VR2 you are allowed
to return to the value you were originally invoked as.
First, remember that the Pyramid UNIX (OS/x) has both System V and 4.2
modes. Assuming bsd mode, It would seem that the Pyramid is wrong for
not doing the first case, since setting the effective to the real is
allowed (and it did do it). In the second case, it is correct. 4.2 only
allows the real to be set to the effective and vice versa. Note that
setuid() will set both the real and the effective on 4.2. There are
other calls to set them individually.
Perhaps you should try the Pyramid in Sys5 mode?
-Ron
More information about the Comp.unix.wizards
mailing list