INN commit: branches/2.4/frontends (inews.c)

INN Commit Russ_Allbery at isc.org
Sun Apr 13 08:11:41 UTC 2008


    Date: Sunday, April 13, 2008 @ 01:11:41
  Author: iulius
Revision: 7769

inews now tries to authenticate if it does not receive a 200 return
code after MODE READER.
Indeed, it might be able to post even with a 201 return code
(and also with another codes like 440 or 480 but such codes
are not RFC compliant in reply to MODE READER).

Thanks to Alan Schwartz for the bug report.

Modified:
  branches/2.4/frontends/inews.c

---------+
 inews.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Modified: inews.c
===================================================================
--- inews.c	2008-04-13 08:11:39 UTC (rev 7768)
+++ inews.c	2008-04-13 08:11:41 UTC (rev 7769)
@@ -989,8 +989,12 @@
 	if ((j = atoi(buff)) != NNTP_BAD_COMMAND_VAL)
 	    i = j;
 
-	if (i != NNTP_POSTOK_VAL)
-            die("you do not have permission to post");
+        if (i != NNTP_POSTOK_VAL) {
+            /* We try to authenticate in case it is all the same possible
+             * to post. */
+            if (NNTPsendpassword((char *)NULL, FromServer, ToServer) < 0)
+                die("you do not have permission to post");
+        }
 	deadfile = NULL;
     }
 



More information about the inn-committers mailing list