INN commit: trunk (4 files)
INN Commit
rra at isc.org
Sun Mar 21 20:09:22 UTC 2010
Date: Sunday, March 21, 2010 @ 13:09:21
Author: iulius
Revision: 9027
Do not allow local postings to junk groups, as it has always
been documented in the active man page (before commit [8735]).
Posting will be allowed in configured to in readers.conf
(local postings).
Modified:
trunk/doc/pod/active.pod
trunk/doc/pod/readers.conf.pod
trunk/nnrpd/list.c
trunk/nnrpd/post.c
--------------------------+
doc/pod/active.pod | 20 ++++++++++----------
doc/pod/readers.conf.pod | 2 +-
nnrpd/list.c | 13 +++++++++----
nnrpd/post.c | 4 +---
4 files changed, 21 insertions(+), 18 deletions(-)
Modified: doc/pod/active.pod
===================================================================
--- doc/pod/active.pod 2010-03-21 17:18:04 UTC (rev 9026)
+++ doc/pod/active.pod 2010-03-21 20:09:21 UTC (rev 9027)
@@ -56,20 +56,20 @@
The fourth field contains one of the following status:
- y Local postings are allowed.
+ y Local postings and articles from peers are allowed.
m The group is moderated and all postings must be approved.
n No local postings are allowed, only articles from peers.
- j Articles are filed in the junk group instead.
+ j Articles from peers are filed in the junk group instead.
x No local postings, and articles from peers are ignored.
=foo.bar Articles are filed in the group foo.bar instead.
If a newsgroup has the C<j> status, no articles will be filed in that
-newsgroup. If an article is locally posted to that group or if an
-article for that newsgroup is received from a remote site, and if it is not
-crossposted to some other valid group, it will be filed into the C<junk>
-newsgroup instead. This is different than simply not listing the group,
-since the article will still be accepted and can be propagated to other
-sites, and the C<junk> group can be made available to readers if wished.
+newsgroup. Local postings are not accepted; if an article for that
+newsgroup is received from a remote site, and if it is not crossposted to
+some other valid group, it will be filed into the C<junk> newsgroup instead.
+This is different than simply not listing the group, since the article will
+still be accepted and can be propagated to other sites, and the C<junk>
+group can be made available to readers if wished.
If the <status> field begins with an equal sign, the newsgroup is an alias.
Articles cannot be posted to that newsgroup, but they can be received from
@@ -80,8 +80,8 @@
created manually with ctlinnd(8).) An alias should not point to another
alias.
-Note that F<readers.conf> can be configured so that local posts
-to newsgroups with status C<n> or C<x> are accepted.
+Note that F<readers.conf> can be configured so that local posts to newsgroups
+with status C<j>, C<n> or C<x> are accepted.
=head1 MINIMAL ACTIVE FILE
Modified: doc/pod/readers.conf.pod
===================================================================
--- doc/pod/readers.conf.pod 2010-03-21 17:18:04 UTC (rev 9026)
+++ doc/pod/readers.conf.pod 2010-03-21 20:09:21 UTC (rev 9027)
@@ -426,7 +426,7 @@
=item L
The client may post to newsgroups that are set to disallow local posting
-(status fields C<n> and C<x> in the active(5) file).
+(status fields C<j>, C<n> and C<x> in the active(5) file).
=back
Modified: nnrpd/list.c
===================================================================
--- nnrpd/list.c 2010-03-21 17:18:04 UTC (rev 9026)
+++ nnrpd/list.c 2010-03-21 20:09:21 UTC (rev 9027)
@@ -151,8 +151,9 @@
}
if (OVgroupstats(group, &lo, &hi, &count, &flag) && flag != NF_FLAG_ALIAS) {
/* When the connected user has the right to locally post, mention it. */
- if (PERMaccessconf->locpost && (flag == NF_FLAG_NOLOCAL
- || flag == NF_FLAG_IGNORE))
+ if (PERMaccessconf->locpost && (flag == NF_FLAG_IGNORE
+ || flag == NF_FLAG_JUNK
+ || flag == NF_FLAG_NOLOCAL))
flag = NF_FLAG_OK;
/* When a newsgroup is empty, the high water mark should be one less
* than the low water mark according to RFC 3977. */
@@ -342,7 +343,9 @@
if (flag != NF_FLAG_ALIAS) {
Printf("%s %u %u %u %c\r\n", p, hi, lo, count,
PERMaccessconf->locpost
- && (flag == NF_FLAG_NOLOCAL || flag == NF_FLAG_IGNORE)
+ && (flag == NF_FLAG_IGNORE
+ || flag == NF_FLAG_JUNK
+ || flag == NF_FLAG_NOLOCAL)
? NF_FLAG_OK : flag);
} else if (savec != '\0') {
*save = savec;
@@ -364,7 +367,9 @@
/* When the connected user has the right to locally post, mention it. */
if (PERMaccessconf->locpost && (q = strrchr(p, ' ')) != NULL) {
q++;
- if (*q == NF_FLAG_NOLOCAL || *q == NF_FLAG_IGNORE)
+ if (*q == NF_FLAG_IGNORE
+ || *q == NF_FLAG_JUNK
+ || *q == NF_FLAG_NOLOCAL)
*q = NF_FLAG_OK;
}
}
Modified: nnrpd/post.c
===================================================================
--- nnrpd/post.c 2010-03-21 17:18:04 UTC (rev 9026)
+++ nnrpd/post.c 2010-03-21 20:09:21 UTC (rev 9027)
@@ -768,14 +768,12 @@
*modgroup = xstrdup(p);
break;
case NF_FLAG_IGNORE:
+ case NF_FLAG_JUNK:
case NF_FLAG_NOLOCAL:
if (!PERMaccessconf->locpost)
snprintf(Error, sizeof(Error),
"Postings to \"%s\" are not allowed here", p);
break;
- case NF_FLAG_JUNK:
- /* Do NOT return an error. */
- break;
case NF_FLAG_ALIAS:
snprintf(Error, sizeof(Error),
"The newsgroup \"%s\" has been renamed\n", p);
More information about the inn-committers
mailing list