Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!marque!uunet!munnari!basser!boyd
From: boyd@basser.oz (Boyd Roberts)
Newsgroups: comp.unix.wizards
Subject: System V.2.2 setuid() broken
Message-ID: <1305@basser.oz>
Date: 13 Jul 88 01:27:33 GMT
References: <5968@umn-cs.cs.umn.edu> <2820@ttidca.TTI.COM> <58603@sun.uucp> <3475@sequent.UUCP> <59537@sun.uucp>
Reply-To: boyd@basser.oz (Boyd Roberts)
Organization: Dept of Comp Sci, Uni of Sydney, Australia
Lines: 18

I'm root and I run a non-root setuid executable.  Then I want
to fork() a shell and do the usual:

	setuid(getuid())

Of course, I get EPERM, because setuid() is broken.  Now is this
a generic System V bug.  I think it is.  Clarification please?

I think what I have is pretty generic SysV.  V8 & 32V do the _right_
thing, they work.  System V has, of course, a mind of it's own.

I _know_ it's a bit silly, but it should _work_.  UNIX did.


Boyd Roberts			boyd@basser.cs.su.oz
				boyd@necisa.necisa.oz

``When the going gets wierd, the weird turn pro...''