[leafnode-list] only_groups_pcre failing lin leafnode2?

Matthias Andree ma at dt.e-technik.uni-dortmund.de
Sun Aug 22 19:14:13 CEST 2004


"Cory C. Albrecht" <cory+leafnode at fenris.cjb.net> writes:

> While watching a run of fetchnews -vvvvv I noticed that certain
> servers were apparently getting queries for groups that did not
> match their only_groups_pcre setting. They were all for alt.binaries
> groups which I have set as delaybody.

There was indeed a bug. This patch fixes the problem for me:

Index: fetchnews.c
===================================================================
RCS file: /var/CVS/leafnode-2/fetchnews.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -r1.158 -r1.159
--- fetchnews.c	20 Aug 2004 09:21:42 -0000	1.158
+++ fetchnews.c	22 Aug 2004 17:13:29 -0000	1.159
@@ -1118,12 +1118,13 @@
     int tryxhdr = 0;
 
     /* lots of plausibility tests */
-    if (!g)
-	return first;
-    if (!is_interesting(g->name))
-	return 0;
+    assert(g);
+    assert(is_interesting(g->name));
+
     if (!chdirgroup(g->name, TRUE))	/* also creates the directory */
 	return 0;
+    if (!gs_match(cursrv -> group_pcre, g->name))
+	return 0;
 
     /* we don't care about x-posts for delaybody */
     delaybody_this_group = delaybody_group(g->name);

-- 
Matthias Andree

NOTE YOU WILL NOT RECEIVE MY MAIL IF YOU'RE USING SPF!
Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)



More information about the leafnode-list mailing list