nnrpd requires auth_init() for an auth hook, contrary to the documentation
Julien ÉLIE
julien at trigofacile.com
Tue Jun 12 21:12:01 UTC 2012
Hi River,
> The documentation (doc/hook-perl) for nnrpd auth hook says:
>
> If a Perl function auth_init() is defined by that file, it is
> called immediately after the file is loaded.
>
> And later:
>
> Provided the file loads without errors, auth_init() (if present)
> runs without fatal errors, and a Perl function authenticate() is
> defined, authenticate() will then be called
>
> This suggests that auth_init() is optional, but it actually isn't. When
> it's not defined, the auth hook will fail:
>
> 200 isis.rt.uk.eu.org InterNetNews NNRP server INN 2.5.2 ready (posting ok)
> authinfo user test
> 381 Enter password
> authinfo pass test
> 400 Internal error (3). Goodbye!
>
> I'm not sure if this is a code or documentation error, but it seems more
> sensible to not require an auth_init function, as most hooks probably
> won't need it.
You're totally right that a discrepancy exists between the code and its
documentation.
auth_init() is now correctly optional. Starting from INN 2.5.3.
Thanks again for having reported the issue!
--
Julien ÉLIE
« Pour célébrer ce jour heureux, buvons un coup, buvons-en deux. »
(Aristophane)
More information about the inn-workers
mailing list