INN commit: trunk (CONTRIBUTORS frontends/inews.c)

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


    Date: Sunday, April 13, 2008 @ 01:11:39
  Author: iulius
Revision: 7768

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:
  trunk/CONTRIBUTORS
  trunk/frontends/inews.c

-------------------+
 CONTRIBUTORS      |    2 +-
 frontends/inews.c |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS	2008-04-13 07:22:38 UTC (rev 7767)
+++ CONTRIBUTORS	2008-04-13 08:11:39 UTC (rev 7768)
@@ -266,4 +266,4 @@
 Chris Caputo, Thomas Parleman, Adam J. Richter, Jim Dutton, Julien Elie,
 Ray Miller, Andreas M. Kirchwitz, Andrey Yakovlev, Christoph Biedl,
 Kai Gallasch, Ollivier Robert, Ivan Shmakov, Kachun Lee, Kirill Berezin,
-D. Stussy
+D. Stussy, Alan Schwartz

Modified: frontends/inews.c
===================================================================
--- frontends/inews.c	2008-04-13 07:22:38 UTC (rev 7767)
+++ frontends/inews.c	2008-04-13 08:11:39 UTC (rev 7768)
@@ -995,8 +995,12 @@
 	if ((j = atoi(buff)) != NNTP_ERR_COMMAND)
 	    i = j;
 
-	if (i != NNTP_OK_BANNER_POST)
-            die("you do not have permission to post");
+        if (i != NNTP_OK_BANNER_POST) {
+            /* 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