[leafnode-list] authentication methods for leafnode NNTP server
Matthias Andree
ma at dt.e-technik.uni-dortmund.de
Thu Aug 19 01:27:50 CEST 2004
"Cory C. Albrecht" <cory+leafnode at fenris.cjb.net> writes:
> Problem is, getpwnam() only works if the process is running as root (uid 0),
> but leafnode drops privileges long before it gets to where it is accepting
> input across the socket.
This is intentional.
> So I was wondering - is it necessary for leafnode to drop privs right
> away?
Technically necessary: no. But it does help a lot because it saves
chown()ing all the freshly created files and directories.
> Or, for setups where authentication is required, could it wait to drop
> privs until after the connection has done AUTHINFO, allowing only a
> limited subet of ocmmands commands (say HELP, AUTHINFO and QUIT)
> before then?
That would add complexity. I've seen bugs in my own programs, and I've
seen so many foreign programs exploited that kept privileges for long or
that did seteuid switching tricks that I'm not comfortable with such
code.
Does it work if you start leafnode as user news, with primary group news
and supplementary group _shadow (OpenBSD) or shadow (Linux)?
--
Matthias Andree
NOTE YOU WILL NOT RECEIVE MY MAIL IF YOU'RE USING SPF!
Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)
More information about the leafnode-list
mailing list