Article View: news.software.nntp
Article #28296Re: Safe to make nnrpd setuid root?
From: Edward S. Marshall
Date: Thu, 21 May 1998 00:00
Date: Thu, 21 May 1998 00:00
30 lines
2076 bytes
2076 bytes
[Posted and mailed]
In article <6k088i$kl$1@canopus.cc.umanitoba.ca>,
mills@cc.umanitoba.ca (Gary Mills) writes:
> I'd like to have nnrpd do authinfo user authentication against
> the passwd map, using the `+' feature of nnrp.access. To do this,
> nnrpd will need to run as root while it obtains the passwd entry.
> Has anyone done this, and is it safe to do so?
Although I haven't done this, I did a quick hack to do NIS authentication
directly (as opposed to using getpw*()). One thing you might consider
doing for your implementation is writing a very small suid executable
which does nothing but take a username and a password on stdin, and exits
with a 1 or 0 depending on whether the user authenticated correctly. Then
just modify nnrpd to fork that program when the AUTHINFO information has
been collected. The beauty of this approach is that it would be relatively
painless to drop another authentication scheme in place should you change
your general authentication mechanisms (for example, using RADIUS for auth
instead of NIS/NIS+ or passwd/shadow).
Generally speaking, I'd be that you'll end up with a more secure result
by doing it this way, rather than running nnrpd as root.
--
/* Edward S. Marshall <emarshal@xnet.com> http://www.xnet.com/~emarshal/ */
char main[] = { 0xf0, 0x0f, 0x7d, 0x8d };
Technical Details
Message-ID:
<6k1gi8$l5h$1@flood.xnet.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-mailReferences:
<6k088i$kl$1@canopus.cc.umanitoba.ca>Show Full Headers
Complete Article Headers
Message-ID: <6k1gi8$l5h$1@flood.xnet.com> Subject: Re: Safe to make nnrpd setuid root? Date: Thu, 21 May 1998 00:00:00 +0000 From: emarshal@xnet.com (Edward S. Marshall) References: <6k088i$kl$1@canopus.cc.umanitoba.ca> 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: 355256107 Mime-Version: 1.0 To: mills@cc.umanitoba.ca (Gary Mills) Content-Type: text/plain; charset=us-ascii Organization: XNet - The Midwest's Leading Network Service Provider - (630) 983-6064 Newsgroups: news.software.nntp