Allow postings to moderated newsgroups using IP? (fwd)

Igor Timkin ivt at logger.gamma.ru
Fri May 26 16:11:59 UTC 2000


Yar has problem with posting to this list without subscription.

----- Forwarded message from Yar Tikhiy -----

From: Yar Tikhiy <yar at comp.chem.msu.su>
Message-Id: <200005261514.TAA20521 at comp.chem.msu.su>
Subject: Re: Allow postings to moderated newsgroups using IP?
In-Reply-To: <200005251404.SAA93605 at logger.gamma.ru> from "Igor Timkin" at "May 25, 0 06:04:54 pm"
To: ivt at gamma.ru
Date: Fri, 26 May 2000 19:14:36 +0400 (MSD)
Cc: inn-workers at isc.org

> Our gate to FIDO (fido7.* USENET hierarchy) run modified nnrpd,
> which check IP address and Approved filed (many fabricated
> Approved :( ). The author of this patch (yar at comp.chem.msu.su)
> will send this patch to inn-patches after testing. There is
> additional access value in the readers.conf:
[skip]

The idea of the change is simple: Why should one allow
approved postings from their users if there are no known
moderators amongst them?
And if there are, it's better to allow them approving
messages on per-user basis, by adding "Approve" or whatever
beginning with "A" to the "access:" line in readers.conf.

Yar

P.S. The patch against inn-CURRENT dated 25.05.2000 follows:

--- commands.c.orig	Thu May 25 14:01:45 2000
+++ commands.c	Fri May 26 17:54:19 2000
@@ -90,6 +90,7 @@
     PERMcanread = FALSE;
     PERMcanpost = FALSE;
     PERMaccessconf->locpost = FALSE;
+    PERMaccessconf->allowapproved = FALSE;
 
     if (!*av) {
 	Reply("%d no authenticator\r\n", NNTP_SYNTAX_VAL);
@@ -194,6 +195,7 @@
 
     PERMcanread = strchr(fields[1], 'R') != NULL;
     PERMcanpost = strchr(fields[1], 'P') != NULL;
+    PERMaccessconf->allowapproved = strchr(fields[1], 'A') != NULL;
     PERMaccessconf->locpost = strchr(fields[1], 'L') != NULL;
     if (strchr(fields[1], 'N') != NULL) PERMaccessconf->allownewnews = TRUE;
     sprintf(PERMuser, "%s@%s", fields[2], fields[0]);
--- nnrpd.h.orig	Thu May 25 14:01:45 2000
+++ nnrpd.h	Fri May 26 17:49:55 2000
@@ -65,6 +65,7 @@
     char *users; 
     int allownewnews;
     int locpost;
+    int allowapproved;
     int used;
     int localtime;
     int strippath;               
--- perm.c.orig	Thu May 25 14:01:46 2000
+++ perm.c	Fri May 26 17:54:30 2000
@@ -733,6 +733,7 @@
 	    curaccess->post = 0;
 	    CLEAR_CONFIG(PERMpost);
 	}
+	curaccess->allowapproved = (strchr(tok->name, 'A') != NULL);
 	curaccess->allownewnews = (strchr(tok->name, 'N') != NULL);
 	curaccess->locpost = (strchr(tok->name, 'L') != NULL);
 	SET_CONFIG(oldtype);
--- post.c.orig	Thu May 25 14:01:46 2000
+++ post.c	Fri May 26 17:56:09 2000
@@ -701,7 +701,9 @@
 #endif /* DO_PYTHON */
 	    break;
 	case NF_FLAG_MODERATED:
-	    if (!approved && !*modgroup) {
+	    if (approved && !PERMaccessconf->allowapproved) {
+		(void)sprintf(Error, "You are not allowed to approve postings");
+	    } else if (!approved && !*modgroup) {
 		*modgroup = COPY(p);
 	    }
 	    break;

----- End of forwarded message from Yar Tikhiy -----



More information about the inn-workers mailing list