INN commit: branches/2.5 (doc/pod/news.pod nnrpd/commands.c)

INN Commit rra at isc.org
Thu May 14 13:38:42 UTC 2015


    Date: Thursday, May 14, 2015 @ 06:38:42
  Author: iulius
Revision: 9862

nnrpd/commands.c:  correct sense of PERMgeneric reply

The comment has always been wrong, as well as the return value for
~15 years...

Thanks to Richard Kettlewell for the patch.

Modified:
  branches/2.5/doc/pod/news.pod
  branches/2.5/nnrpd/commands.c

------------------+
 doc/pod/news.pod |    7 +++++++
 nnrpd/commands.c |    8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

Modified: doc/pod/news.pod
===================================================================
--- doc/pod/news.pod	2015-05-14 13:33:02 UTC (rev 9861)
+++ doc/pod/news.pod	2015-05-14 13:38:42 UTC (rev 9862)
@@ -76,6 +76,13 @@
 
 =item *
 
+Fixed the use of the legacy AUTHINFO GENERIC command, that has been
+broken since S<INN 2.4.0> (therefore proving readers probably no longer
+use that method to authenticate).  Thanks to Richard Kettlewell for
+having noticed, though.
+
+=item *
+
 Add the B<nnrp.access2readers.conf> contribution script written by
 Jeffrey S<M. Vinocur> to convert old-style F<nnrp.access> file to
 F<readers.conf>.

Modified: nnrpd/commands.c
===================================================================
--- nnrpd/commands.c	2015-05-14 13:33:02 UTC (rev 9861)
+++ nnrpd/commands.c	2015-05-14 13:38:42 UTC (rev 9862)
@@ -87,8 +87,8 @@
 
 /*  Returns:
 **    -1 for problem (such as no such authenticator, etc.).
-**     0 for authentication succeeded.
-**     1 for authentication failed.
+**     1 for authentication succeeded.
+**     0 for authentication failed.
 */
 static char *PERMauthstring;
 
@@ -201,7 +201,7 @@
 
     waitpid(pid, &status, 0);
     if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
-        return 1;
+        return 0;
 
     if ((p = strchr(path, '\n')) != NULL)
 	*p = '\0';
@@ -232,7 +232,7 @@
     //for (i = 0; fields[i] && i < 5; i++)
     //    syslog(L_NOTICE, "fields[%d] = %s\n", i, fields[i]);
 
-    return 0;
+    return 1;
 }
 
 



More information about the inn-committers mailing list