*BSD News Article 60564


Return to BSD News archive

#! rnews 1174 bsd
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!spasun.tpa.com.au!news.adelaide.on.net!yarrina.connect.com.au!news.mel.connect.com.au!munnari.OZ.AU!news.hawaii.edu!ames!hookup!news.mathworks.com!news4.ner.bbnplanet.net!news.ner.bbnplanet.net!ileaf!news.iddis.com!news  
From: pmarquis@iddptm.iddis.com (Paul Marquis)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: setuid() semantics
Date: 01 Feb 1996 12:33:20 -0500
Organization: IDD Information Services
Lines: 11
Sender: pmarquis@iddptm.iddis.com
Message-ID: <87zqb3uf1b.fsf@iddptm.iddis.com>
Reply-To: pmarquis@iddis.com
NNTP-Posting-Host: iddptm.iddis.com
X-Newsreader: Gnus v5.1

A program file owned by the user guest (not really, but useful for purposes
of example), makes a call to setuid() with the user id of guest.  If the
superuser runs the program, the process turns over to the user guest after
the call to setuid(), as one would expect.  However, if the set-user-ID bit
is set the program is set, setuid() does not work, but setreuid() does.

Is this a bug or a feature of setuid()?  I'm running FreeBSD 2.1.0.  Thanks
for your help.
-- 
Paul, the Edge, Marquis
pmarquis@iddis.com