[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] authentication methods for leafnode NNTP server



"Cory C. Albrecht" <cory+leafnode@xxxxxxxxxxxxxx> 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)
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/