Xref: utzoo comp.unix.wizards:15075 comp.bugs.sys5:808 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-winken!uunet!mcvax!ukc!axion!fulcrum!igb From: igb@Fulcrum.BT.CO.UK (Ian G Batten) Newsgroups: comp.unix.wizards,comp.bugs.sys5 Subject: setuid (euid) after setuid (uid) on System 5 Message-ID: <123@cat.Fulcrum.BT.CO.UK> Date: 14 Mar 89 18:38:08 GMT Organization: BT Fulcrum, Birmingham, England. Lines: 24 Should the following program work or not, on System Five? This is a common idiom in the source code of HoneyDanber uucp, and two local System Five machines refuse to honour the second setuid. The manual page implies they should. Please, no flames --- just mail me an answer. I've been sweating blood over the code all day and I hope I can lodge this as a kernel problem. ian main () { int uid, euid; printf ("uid = %d; euid = %d\n", uid = getuid (), euid = geteuid ()); if (setuid (uid) != 0) perror ("setuid (uid)"); printf ("uid = %d; euid = %d\n", getuid (), geteuid ()); if (setuid (euid) != 0) perror ("setuid (euid)"); printf ("uid = %d; euid = %d\n", getuid (), geteuid ()); } -- Ian G Batten, BT Fulcrum - igb@fulcrum.bt.co.uk - ...!uunet!ukc!fulcrum!igb