Allow postings to moderated newsgroups using IP?
Yar Tikhiy
yar at comp.chem.msu.su
Fri May 26 15:14:36 UTC 2000
> 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;
More information about the inn-workers
mailing list