INN 2.3.0 authentication using perl hooks

Tim Pennick T.Pennick at axion.bt.co.uk
Wed Oct 25 15:14:20 UTC 2000



Hi,

I've posted queries about this problem to the newsgroup (news.software.nntp),
but I'm now wondering whether it is a bug rather than a problem with my
understanding of what's supposed to happen.  Apologies if I'm wrong.

As the subject suggests I'm attempting to use the perl authentication hooks to
implement password access to selected newsgroups. I want most newsgroups to be
available based on old-style nnrp.access information i.e. people from
nominated domains or address ranges will be able to log in without being asked
for a username/password.  However, if they attempt to access one of the
password protected groups they will trigger the authentication process which
will ask for username and passord to be supplied.

I first tried implementing this via readers.conf, but found that the
permutations and combinations needed to describe this setup were too
complicated using this mechanism.

While trying to confirm my understanding of the way INN 2.3.0 works, I set up
a very simple 'authenticate' function in the perl authorisation file in
..../news/bin/filter, which simply returns an array containing
the follwing five values
200,1,1,*,0

I believe that the first value should be the value sent to the client, and
that 200 is reading and posting enabled.  The second and third elements are
flags indicating separately that reading and posting are enabled.  The fourth
element indicates that all newsgroups are accessible, and the 5th element
indicates that there is no limit on the transmission rate between server and
client.

Having returned this value I'd expect the client to have full access to all
newsgroups, but this doesn't happen.  E.g. If I telnet into the server and
receive the 200 server ready posting OK message, and type "list", I get the
message about the format to be returned, followed by a . on a line on its own,
and then no data.

If I switch off nnrp_perlauth in inn.conf, then access to newsgroups is
restored.

I believe this to be a bug, though I haven't yet managed to isolate it in the
code, and am not familiar enough with the code to be confident that I could do
this.

Regards and thanks

Tim Pennick



More information about the inn-bugs mailing list