*BSD News Article 51233


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!vtc.tacom.army.mil!news2.acs.oakland.edu!newsxfer.itd.umich.edu!agate!howland.reston.ans.net!torn!ccshst05.cs.uoguelph.ca!ccshst01.cs.uoguelph.ca!bbarber
From: bbarber@uoguelph.ca (DYE JOB)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: BSDI setuid()
Date: 12 Sep 1995 15:05:00 GMT
Organization: University of Guelph
Lines: 18
Message-ID: <4347is$lm5@ccshst05.cs.uoguelph.ca>
NNTP-Posting-Host: ccshst01.cs.uoguelph.ca
X-Newsreader: TIN [version 1.2 PL2]

I've noticed a difference with BSDI setuid() as apposed to that on
a SYSV system.  Unfortunately, this is causing some problems for me
with "rnews".

As it turns out, "setuid(geteuid())" will return -1 from a program
that is being executed by any program that is u+s.  This is the case
with rnews.  Usually, I would run rnews from uuxqt (running +s user uucp),
and everything should be fine.  But on BSDI, rnews quits with the following
error message in the logs "rnews: cant setuid to 6 Operation not permitted".
(6 = uucp).

One solution might be to run rnews "+s" as user uucp, making sure that
it's not world executable.  I don't really like the idea of running
programs suid, though, especially when it says nowhere in the documentation
that they should be.  I am hoping that someone that has come across
this problem could share a few ideas.  I would greatly appreciate it.

-Blaine