Article View: news.software.nntp
Article #82555INN and "ovgrouppat" - bug?
From: D. Stussy
Date: Tue, 12 Jan 2010 10:24
Date: Tue, 12 Jan 2010 10:24
41 lines
3133 bytes
3133 bytes
I had the occasion to read the OVgroupmatch() subroutine in
storage/expire.c (about line 816), and I'm not certain that it follows the
general poisoned-wildmat rules.
I see that it defaults to false. I see that if there's a positive match,
it is set to true, and poisoned groups abort with false. However, are
later sub-patterns (patterns specifying groups or sub-hierarchies of
earlier-matched hierarchies) properly processed? If a later sub-pattern is
negated with "!", I don't see how the result is turned back to false.
Also, if a poisoned group matches, the immediate return prevents subsequent
patterns from matching. This doesn't seem to be the same result as
uwildmat processing. It appears that the leftmost match governs while the
rightmost match governs wildmat functions, yet this function is described
as a wildmat function. The manual page entry for inn.conf does not hint
that the behavior is different.
Specifying a pattern string like "all except ..., except",
"*,!pattern,pattern.sub ...", will return false for "pattern.sub" when it
should return true.
Remember that as "ovgrouppat" is read into the array OVpatterns, each array
element is a separate pattern - divided by the commas in the configuration
parser. Therefore, we have to compare all of the patterns in case a later
pattern flips the result - thus resulting in a rightmost match.
If there are no positive sub-hierarchy matches (i.e. without "!" and "@")
to the right of any negative matches ("!" or "@") for that same
sub-hierarchy or its superset, then there is no problem. Only when there
are patterns contained in other patterns is there a problem.
Code (fix?):
Instead of "return false;", should we have a "wanted = false;"? This would
make the conditional under case "!" and before case "@" unnecessary.
Alternatively, we could loop through the patterns from high to low (right
to left) instead of low to high (left to right) and return on the first
(rightmost) match (whether true or false).
This issue appears present in INN 2.5.1.
Technical Details
Message-ID:
<hihikq$hje$1@snarked.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!usenetcore.com!news.he.net!news.snarked.org!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <hihikq$hje$1@snarked.org> Subject: INN and "ovgrouppat" - bug? Date: Tue, 12 Jan 2010 02:24:17 -0800 From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!usenetcore.com!news.he.net!news.snarked.org!not-for-mail Newsgroups: news.software.nntp Lines: 41 Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org> NNTP-Posting-Host: pool-71-118-53-20.lsanca.dsl-w.verizon.net X-Trace: snarked.org 1263291866 18030 71.118.53.20 (12 Jan 2010 10:24:26 GMT) X-Complaints-To: newsmaster+complaints@snarked.org NNTP-Posting-Date: Tue, 12 Jan 2010 10:24:26 +0000 (UTC) X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 X-Original-Bytes: 2892