rdist/setreuid
Guy Harris
guy at auspex.auspex.com
Sun Mar 31 09:43:40 AEST 1991
>We ran into a problem while trying to port rdist from 4.3bsd to sysVr3.
>rdist uses setreuid to switch back and forth between root and the user,
>but sysVr3 (and even sysVr4 apparently) only has setuid; ie, once
>you're the user, there's no going back to root. Are we overlooking
>something? It's particularly surprising that sysVr4 also seems to
>have this limitation.
S5R4 may have, as an undocumented feature, a "seteuid()" call that, even
if you're root, sets *only* the effective UID and leaves the
saved-set-user ID alone. I think the next POSIX 1003.1 supplement will
mandate "seteuid()", so it shouldn't remain undocumented forever....
(S5R4 apparently has a "setreuid()" call in the BSD compatibility
library; whether any particular vendor supplies that library is up to
them. I don't know how complete it is, and I think it's implemented, in
part, atop "seteuid()"....)
More information about the Comp.unix.programmer
mailing list