"simple" problem with post-access in nnrpd_auth.pl

Russ Allbery rra at stanford.edu
Mon Nov 19 00:30:35 UTC 2001

Marcel Bruch <bruch.m at dni.de> writes:

> sub authenticate {
>  if ($attributes{type} eq "connect") {
>    return ($connectcodes{'authneeded'}, undef, undef, undef);
>  }elsif ($attributes{type} eq "authenticate") {
>    return ($authcodes{'allowed'}, 1, 1, $defaultgroups);
>  }elsif ($attributes{type} eq "disconnect") {
>  }
>  return 502;
> }

> Telnet on port 119 sends this welcome message:

>> 201 dni-ldap.cheruskia InterNetNews NNRP server INN 2.2.3 18-Jul-2000 ready (no posting).
> _

So you're returning undef on connect for the flag saying whether the
client can post, and the server is therefore correctly reporting 201 as
the initial greeting code saying that the client can't post.  The client
isn't smart enough to realize this has changed after it authenticates;
that's a standard problem.  If via any authentication method the client
will eventually be able to post, one has to say that it can post from the
very beginning, since otherwise the client remembers too much information.

Change the first two undef, undef in the return for the connect to 1, 1.
Does that work any better?

> This Server has no real domainname - the server is only available over
> IP, could this be a reason for my problems ?


Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

More information about the inn-workers mailing list