🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40971

Re: inndstart: setreuid(222, 0) failed: Not owner

#40971
From: bill davidsen
Date: Wed, 20 Oct 1999 00:00
33 lines
2195 bytes
In article <ylln8zavsu.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
| Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:
| 
| > On systems with saved-ids (even ones like FreeBSD where _POSIX_SAVED_IDS
| > isn't defined) you should probably do something like
| 
| >    setreuid(-1, news_user);
| 
| > to become the news user (temporarily dropping permissions), and
| 
| >    setreuid(-1, 0);
| 
| > to switch back to root. (This works because your saved-set-uid is root,
| > so you're allowed to do this.)
| 
| I was thinking about that, but didn't understand saved IDs well enough.
| Okay.  How do I detect whether the system has saved IDs?  (Be convenient
| to be able to run configure checks as root for this sort of thing....)

  As noted elsewhere, I'm not positive what the value of ruid is on AIX
for a setuid program. The euid is definitely root, but ruid?? I want to
try setting ruid to root (probably sets euid), then euid to news, and
see if I can switch euid back to rootback. Before the exec I would set
everything the news.

-- 
bill davidsen <davidsen@tmr.com>  CTO, TMR Associates, Inc
  When taking small children to a carnival, always have them go potty
*before* you let them go on the rides, and let them eat all the junk
food and candy *after*.

Technical Details
Message-ID: <7ukpid$4gt$1@newssvr02.news.prodigy.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <7u5k8b$3uu$1@newssvr02.news.prodigy.com> <ylaepltvlk.fsf@windlord.stanford.edu> <87k8ojr9bb.fsf@erlenstar.demon.co.uk> <ylln8zavsu.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <7ukpid$4gt$1@newssvr02.news.prodigy.com>
Subject: Re: inndstart: setreuid(222, 0) failed: Not owner
Date: Wed, 20 Oct 1999 00:00:00 +0000
From: davidsen@tmr.com (bill davidsen)
References: <7u5k8b$3uu$1@newssvr02.news.prodigy.com> <ylaepltvlk.fsf@windlord.stanford.edu> <87k8ojr9bb.fsf@erlenstar.demon.co.uk> <ylln8zavsu.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 538466770
X-Complaints-To: abuse@prodigy.net
X-Trace: newssvr02.news.prodigy.com 940435853 4637 199.4.137.118 (20 Oct 1999 16:10:53 GMT)
Organization: TMR Associates, Schenectady NY
Newsgroups: news.software.nntp
Originator: davidsen@darkstar.prodigy.com