INN commit: trunk/nnrpd (list.c)
INN Commit
rra at isc.org
Thu Feb 4 22:34:34 UTC 2010
Date: Thursday, February 4, 2010 @ 14:34:34
Author: iulius
Revision: 8945
When a user is allowed to locally post articles, then LIST
ACTIVE will return the right "y" flag (instead of "n" or "x").
Modified:
trunk/nnrpd/list.c
--------+
list.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
Modified: list.c
===================================================================
--- list.c 2010-02-04 22:15:27 UTC (rev 8944)
+++ list.c 2010-02-04 22:34:34 UTC (rev 8945)
@@ -113,7 +113,7 @@
bool range;
range = (ac > 2 && strcasecmp(av[2], "RANGE") == 0);
-
+
if (ac > 2 && (strcasecmp(av[2], "MSGID") != 0)
&& !range) {
Reply("%d Syntax error in arguments\r\n", NNTP_ERR_SYNTAX);
@@ -150,6 +150,10 @@
return false;
}
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))
+ 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. */
if (count == 0)
@@ -342,6 +346,15 @@
if (savec != '\0')
*save = savec;
+ if (lp == &INFOactive) {
+ /* 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)
+ *q = NF_FLAG_OK;
+ }
+ }
+
Printf("%s\r\n", p);
}
QIOclose(qp);
More information about the inn-committers
mailing list