Re: nntpcached bugs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 1: Dnews says "bytecount" rather than "bytes" in "list overview.fmt -
> totally outside the xover nntp extensions, butt hey just don't care.
> 
> This royally screws up linecounts for articles from this server, and they
> always say 0 lines.
> 
> Worse, if the overview.fmt control line in nntpcahce's config file is
> altered to handle it, it screws up the INN ones.

Someone else (in .nz too interestingly enough) reported this problem.
The OverviewFmt control in the config file is doesn't effect how overviews
are parsed - only how they are stored (and thus emited). OverviewFmtDef
does effect how overviews are translated, but only for sites that refused
to provide nntpcache with an overview.fmt. If the news-server provides
nntpcache with an overview.fmt nntpcache uses this information to 
translate the fields from the servers overview.fmt -> OverviewFmt
(the nntpcache overview.fmt). 

I'd like some examples of what is going on. It is a little hard to
be certain of addressing this problem correctly
without access to a dnews server. It isn't clear to me that you
dealing with Bytecount -> Bytes as you keep talking about lines
(lines!=bytes).

> 2: I have a braindead feeder who's listing groups but then refusing to
> allow access by wildcard filter such as !*sex*, etc. This just happens to
> be the aforementioned Dnews lusers (why isn't that surprising?) :-)
> 
> nntpcached refuses to go around them because it sees them in the active
> file and decides that the group should come from there.

All you have to do is something like this (presuming you know which
groups are being filtered):

%BeginGroups
*               7thday.feed.com.
*sex*      	hotpanties.feed.com.

note the order here.

> 3: nntpcached is trying to feed/get all articles from the "*" pool to the
> prime upstream server - even though it doesn't list it in the active file.
> End result "502, no such group" being fed to the users. Bad juju.

There are a varity of reasons as to why you don't want to base
configuration information on what is in an active file at any one
point in time. The way to address your problem is with the regular
nntpcache group -> server configuration. This can be a little
irritating when you are dealing with two or more large servers with
many over-lapping groups, because you can't just wild card them,
and have nntpcache work out the differences. You can however obtain
LIST ACTIVE outputs from each server, and do something like this:

	awk <main.server '{print $1}' >main2
	awk <secondary.server '{print $1}' >sec2
	diff -u main2 sec2 | 
		awk '/^+/ {printf("%s* panties.feed.com.\n",
			substr($1, 2))}' >> servers
			 
> 4: (and a real big problem). if nntpcached gets "ihave", it connects to the
> listed ihave server - and then says "mode reader". Arrrrrrgh!

INN will take ihave's in reader mode. Does this actually break anything?
(due to caching of server connections it would be a little annoying to
change - although you are unlikely to see ihave and reader traffic on
the same session).

> Pointers to some way of being able to generate uucp batches would be
> appreciated. To interface to existing group subscription controllers I need
> aggregate active and newsfeeds files generated. I think the rest can be
> handled with Suck.

You could suck via nntpcache into inn. nntpcache does the aggregating
automatically (so, just ask it for the active file - newsfeeds is
another matter)

> One last request, mainly to prevent nntp forgeries.: A new flag "ihave" in
> the access list - which only allows "ihave" flagged hosts to actually use
> that command. Otherwise any lamebrain spammer can post his cruft by forging
> into the nntpcached server - I've already had a couple of attempts to do this.

See following patch (untested - it compiles though :)

> Next big hurdle is to get the software registered. I've been hearing lots
> of complaints about getting bugs fixed, so I'm a bit leery until I know
> these items will be fixed, having paid rego fees on other software and been
> let down by authors who've promised fixes and then disappeared.
> 
> Regards
> Alan Brown

It's not a bug, it's a feature :)

There are a lot of unsung heros on the nntpcache-users mailing list
who take great delight in tripping me (and other nntpcache coders)
up with bug fixes (which sometimes introduce bugs I may add. nyah. nyah :)

Cheers,
Julian.

Index: nntpcache.access
===================================================================
RCS file: /usr/local/cvs/nntpcache/nntpcache.access,v
retrieving revision 1.14
diff -u -r1.14 nntpcache.access
--- nntpcache.access	1996/09/15 10:29:03	1.14
+++ nntpcache.access	1997/09/14 19:09:41
@@ -5,7 +5,7 @@
 # remote host isn't running identd, then the username "unknown" will be
 # returned.
 #
-# matching is top down, from the general to the specific. the last match is 
+# matching is top down, from the general to the specific. the LAST MATCH is 
 # dominant. If the last match is a negation then access is refused.
 #
 # this is a merged access schema. it controls both permission to talk
@@ -77,7 +77,7 @@
 # of conservatism. not so cool.
 *			*		deny
 # we are now a french legal system access file. users are guilty until
-# proven innocent (an innocent user? now there is a radikal concept)
+# proven innocent (an innocent user? now there is a radikal concept).
 # full access for our local network
 localhost		*		read,post,filter	spam.filter
 suburbia.net		*		read,post
@@ -85,6 +85,11 @@
 203.4.184.*		*		read,post
 # except for
 *			tempered.*	deny
+# give ihave only access to our feeder sites - 
+# the * here in the group field serves as a place holder
+lemming.dsd.gov.au	*		ihave
+# except for tinkertrain, which both feeds and reads
+tinkertrain.suburbia.net *		ihave,read,post
 # stdin is used for debuging (e.g nntpcached -n -i)
 # note that we don't allow REAL hosts to have funny
 # characters like <> in them.
Index: acc.c
===================================================================
RCS file: /usr/local/cvs/nntpcache/acc.c,v
retrieving revision 1.38
diff -u -r1.38 acc.c
--- acc.c	1997/07/12 13:49:21	1.38
+++ acc.c	1997/09/14 18:50:07
@@ -305,6 +305,9 @@
 			if (strCaseEq(p, "censor"))
 				ll->censor = TRUE;
 			else
+			if (strCaseEq(p, "ihave"))
+				ll->ihave = TRUE;
+			else
 			if (strCaseEq(p, "strip"))
 			{
 				
Index: acc.h
===================================================================
RCS file: /usr/local/cvs/nntpcache/acc.h,v
retrieving revision 1.9
diff -u -r1.9 acc.h
--- acc.h	1997/03/06 10:48:54	1.9
+++ acc.h	1997/09/14 18:37:03
@@ -21,4 +21,5 @@
 	unsigned int auth:1;
 	unsigned int filter:1;
 	unsigned int censor:1;
+	unsigned int ihave:1;
 };
Index: ihave.c
===================================================================
RCS file: /usr/local/cvs/nntpcache/ihave.c,v
retrieving revision 1.7
diff -u -r1.7 ihave.c
--- ihave.c	1996/10/05 09:18:31	1.7
+++ ihave.c	1997/09/14 18:49:03
@@ -6,6 +6,14 @@
 {
 	struct server_cfg *scfg;
 	char buf[MAX_LINE];
+	struct authent *auth;
+	auth = authorise(RemoteHosts, NULL);
+	if (!auth || !auth->ihave || (auth->auth && AuthState != valid))
+	{
+		log (("%s denied ihave access", ClientHost));
+		emitf ("%d Transfer permission denied", NNTP_AUTH_NEEDED_VAL);
+		return;
+	}
 	scfg = findScfg(con.ihaveServer);
 	if (!scfg)
 	{


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux