INN commit: trunk (innd/nc.c nnrpd/commands.c)

INN Commit Russ_Allbery at isc.org
Tue Aug 26 19:57:48 UTC 2008


    Date: Tuesday, August 26, 2008 @ 12:57:47
  Author: iulius
Revision: 7976

If authentication fails, do not close the connection but allow
the user to authenticate again.

Modified:
  trunk/innd/nc.c
  trunk/nnrpd/commands.c

------------------+
 innd/nc.c        |    1 -
 nnrpd/commands.c |    9 ++++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

Modified: innd/nc.c
===================================================================
--- innd/nc.c	2008-08-26 19:04:33 UTC (rev 7975)
+++ innd/nc.c	2008-08-26 19:57:47 UTC (rev 7976)
@@ -406,7 +406,6 @@
 
     /* Got the password -- is it okay? */
     if (!RCauthorized(cp, p)) {
-	cp->State = CSwritegoodbye;
 	NCwritereply(cp, NNTP_AUTH_BAD);
     } else {
 	cp->State = CSgetcmd;

Modified: nnrpd/commands.c
===================================================================
--- nnrpd/commands.c	2008-08-26 19:04:33 UTC (rev 7975)
+++ nnrpd/commands.c	2008-08-26 19:57:47 UTC (rev 7976)
@@ -193,9 +193,9 @@
 	    case 0:
 		syslog(L_NOTICE, "%s bad_auth %s (%s)", Client.host, PERMuser,
 			logrec);
-		Reply("%d Authentication failed\r\n", NNTP_ERR_ACCESS);
+		Reply("%d Authentication failed\r\n", NNTP_FAIL_AUTHINFO_BAD);
 		free(logrec);
-		ExitWithStats(1, false);
+		return;
 	    default:
 		/* lower level has issued Reply */
 		return;
@@ -261,11 +261,10 @@
 	syslog(L_NOTICE, "%s bad_auth", Client.host);
         if (errorstr[0] != '\0') {
             syslog(L_NOTICE, "%s script error str: %s", Client.host, errorstr);
-            Reply("%d %s\r\n", NNTP_ERR_ACCESS, errorstr);
+            Reply("%d %s\r\n", NNTP_FAIL_AUTHINFO_BAD, errorstr);
         } else {
-            Reply("%d Authentication error\r\n", NNTP_ERR_ACCESS);
+            Reply("%d Authentication failed\r\n", NNTP_FAIL_AUTHINFO_BAD);
         }
-	ExitWithStats(1, false);
     }
 
 }



More information about the inn-committers mailing list