INN commit: trunk/nnrpd (commands.c sasl.c)

INN Commit Russ_Allbery at isc.org
Sun Sep 7 13:44:20 UTC 2008


    Date: Sunday, September 7, 2008 @ 06:44:20
  Author: iulius
Revision: 8017

It is 501 and not 500 for unknown AUTHINFO variants (RFC 3977 & 4643).

Modified:
  trunk/nnrpd/commands.c
  trunk/nnrpd/sasl.c

------------+
 commands.c |   10 ++++++----
 sasl.c     |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

Modified: commands.c
===================================================================
--- commands.c	2008-09-07 13:31:58 UTC (rev 8016)
+++ commands.c	2008-09-07 13:44:20 UTC (rev 8017)
@@ -221,7 +221,7 @@
 
         /* If it is not AUTHINFO PASS, we do not support the provided subcommand. */
         if (strcasecmp(av[1], "PASS") != 0) {
-            Reply("%d Bad AUTHINFO param\r\n", NNTP_ERR_COMMAND);
+            Reply("%d Bad AUTHINFO param\r\n", NNTP_ERR_SYNTAX);
             return;
         }
 
@@ -290,8 +290,9 @@
 
 /*
 **  Handle the MODE command.
+**  Note that MODE STREAM must return 501 as an unknown MODE variant
+**  because nnrpd does not implement STREAMING.
 */
-/* ARGSUSED */
 void
 CMDmode(int ac UNUSED, char *av[])
 {
@@ -305,9 +306,10 @@
                PERMaccessconf->pathhost, INN_VERSION_STRING,
                (!PERMneedauth && PERMcanpost) ? "posting ok" : "no posting");
     else
-        Reply("%d What?\r\n", NNTP_ERR_SYNTAX);
+        Reply("%d Unknown MODE variant\r\n", NNTP_ERR_SYNTAX);
 }
 
+
 static int GroupCompare(const void *a1, const void* b1) {
     const GROUPDATA     *a = a1;
     const GROUPDATA     *b = b1;
@@ -315,6 +317,7 @@
     return strcmp(a->name, b->name);
 }
 
+
 /*
 **  Display new newsgroups since a given date and time for specified
 **  <distributions>.
@@ -442,7 +445,6 @@
 /*
 **  Handle the POST and IHAVE commands.
 */
-/* ARGSUSED */
 void
 CMDpost(int ac, char *av[])
 {

Modified: sasl.c
===================================================================
--- sasl.c	2008-09-07 13:31:58 UTC (rev 8016)
+++ sasl.c	2008-09-07 13:44:20 UTC (rev 8017)
@@ -40,7 +40,7 @@
     int r = SASL_OK;
 
     if (ac < 3 || ac > 4) {
-	Reply("%d AUTHINFO SASL mech [init-resp]>\r\n", NNTP_ERR_COMMAND);
+	Reply("%d AUTHINFO SASL mech [init-resp]>\r\n", NNTP_ERR_SYNTAX);
 	return;
     }
 



More information about the inn-committers mailing list