Bug in NNTPsendpassword

Russ Allbery rra at stanford.edu
Sun Apr 10 03:28:31 UTC 2005


Adam Wysocki <gophi at apcoh.org> writes:

> In inn 2.4.2, lib/sendpass.c, we have:

>     /* What server are we interested in?  Default to the campus one. */
>     if (server == NULL
>      && (server = innconf->server) == NULL)
>         return -1;

> Some programs (for example backends/innxmit.c) rely on errno value, 
> when returned value is -1. Example:

>         if (NNTPsendpassword(REMhost, From, To) < 0 || GotAlarm) {
>             i = errno;
>             syswarn("cannot authenticate with %s", REMhost);
>             syslog(L_ERROR, CANT_AUTHENTICATE,
>                 REMhost, GotAlarm ? "timeout" : strerror(i));
>             /* Don't send quit; we want the remote to print a message. */
>             SMshutdown();
>             exit(1);
>         }

> Can this be considered a bug?

I suppose.  I've changed it in CVS to set errno to something vaguely
appropriate to produce better error messages.

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



More information about the inn-bugs mailing list