Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool.mu.edu!samsung!umich!terminator!pisa.ifs.umich.edu!rees From: rees@pisa.ifs.umich.edu (Jim Rees) Newsgroups: news.software.b Subject: Re: C News and setuid(geteuid) Message-ID: <4f948f06.1bc5b@pisa.ifs.umich.edu> Date: 2 Feb 91 21:46:48 GMT References: <1991Feb2.060633.23602@zoo.toronto.edu> Sender: usenet@terminator.cc.umich.edu (usenet news) Reply-To: rees@citi.umich.edu (Jim Rees) Organization: University of Michigan IFS Project Lines: 19 In article <1991Feb2.060633.23602@zoo.toronto.edu>, geoff@zoo.toronto.edu (Geoffrey Collyer) writes: Mogens Lynnerup: > In relay/relaynews.c C News wants to do a setuid(geteuid)... > ...it doesn't work... I've tried ... an Apollo > DN3500 running Domain/OS 10.2 ... ...it's hard to be sure just *what* a modern System V does with setuid(geteuid()), but judging from the complaints we have had, it doesn't set the real uid (i.e. it botches the setuid() call) or getuid() doesn't return the real uid (a different botch). I wrote the getuid() and setuid() system calls used in Apollo Domain/OS 10.2. In Berkeley (real) Unix, setuid() sets both real and effective IDs. In System V, it doesn't. I don't remember if there is any way to set the real user id in System V. Seems to me there was some stupid "security" reason for this, but we never tried to figure out System V, we just implemented it. Everyone in R&D at Apollo used Berkeley Unix (both flavors run on the same machine at the same time).