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

INN Commit Russ_Allbery at isc.org
Tue Aug 26 20:50:42 UTC 2008


    Date: Tuesday, August 26, 2008 @ 13:50:41
  Author: iulius
Revision: 7977

Remove PERMpass which is never used (dead code).

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

------------+
 commands.c |   16 ++--------------
 nnrpd.h    |    1 -
 2 files changed, 2 insertions(+), 15 deletions(-)

Modified: commands.c
===================================================================
--- commands.c	2008-08-26 19:57:47 UTC (rev 7976)
+++ commands.c	2008-08-26 20:50:41 UTC (rev 7977)
@@ -154,7 +154,7 @@
     PERMaccessconf->allowihave = strchr(fields[1], 'I') != NULL;
     if (strchr(fields[1], 'N') != NULL) PERMaccessconf->allownewnews = true;
     snprintf(PERMuser, sizeof(PERMuser), "%s@%s", fields[2], fields[0]);
-    strlcpy(PERMpass, fields[3], sizeof(PERMpass));
+    /*strlcpy(PERMpass, fields[3], sizeof(PERMpass));*/
     strlcpy(accesslist, fields[4], size);
     /*strcpy(writeaccess, fields[5]); future work? */
 
@@ -227,23 +227,11 @@
         /* There is a cached username and a password is provided. */
         strlcpy(Password, av[2], sizeof(Password));
 
-        if (strcmp(User, PERMuser) == 0 && strcmp(Password, PERMpass) == 0) {
-            syslog(L_NOTICE, "%s user %s", Client.host, PERMuser);
-            if (LLOGenable) {
-                fprintf(locallog, "%s user (%s):%s\n", Client.host, Username, PERMuser);
-                fflush(locallog);
-            }
-            Reply("%d Ok\r\n", NNTP_OK_AUTHINFO);
-            PERMneedauth = false;
-            PERMauthorized = true;
-            PERMcanauthenticate = false;
-            return;
-        }
-        
         errorstr[0] = '\0';
         
         PERMlogin(User, Password, errorstr);
         PERMgetpermissions();
+
         /* If authentication is successful. */
         if (!PERMneedauth) {
             syslog(L_NOTICE, "%s user %s", Client.host, PERMuser);

Modified: nnrpd.h
===================================================================
--- nnrpd.h	2008-08-26 19:57:47 UTC (rev 7976)
+++ nnrpd.h	2008-08-26 20:50:41 UTC (rev 7977)
@@ -171,7 +171,6 @@
 extern char	*ACTIVE;
 extern char	*NEWSGROUPS;
 extern char	*NNRPACCESS;
-EXTERN char	PERMpass[SMBUF];
 EXTERN char	PERMuser[SMBUF];
 EXTERN FILE	*locallog;
 EXTERN ARTNUM	ARTnumber;	/* Current article number */



More information about the inn-committers mailing list