Re: BEWARE! Linux seteuid is broken!

Zefram (A.Main@dcs.warwick.ac.uk)
Tue, 18 Jun 1996 15:28:13 +0100 (BST)


>As I said before, when I implemented POSIX_SAVED_IDS during the 0.99 (or
>was it 0.13, I don't remember) days, I implemented true POSIX_SAVED_IDS,
>and then I implemented setreuid() and seteuid() to be BSD 4.3
>compatible. The real problem is that BSD 4.4 isn't POSIX_SAVED_IDS
>compatible, and it's also not BSD 4.3 compatible.
[complex analysis of various behaviours deleted]

*cringe*

Let's just implement {s,g}etresuid(), and do the rest with
compatibility libraries. If the kernel allows arbitrary exchange of
ruid, euid and suid, it will be possible to implement any Unix' set*uid
semantics in a library function. We can have the broken POSIX setuid,
4.3BSD set{e,re,}uid, and 4.4BSD set{e,re,}uid as separate functions in
libc, and programs could select semantics at compile time by doing
"#define __BSD43_IDS" etc.

-zefram