Article View: news.software.nntp
Article #38471Re: reader.conf docs?
From: Aidan Cully
Date: Wed, 07 Jul 1999 00:00
Date: Wed, 07 Jul 1999 00:00
72 lines
2787 bytes
2787 bytes
If you'd like specific help with your readers.conf, please reply to me
in e-mail.
In news.software.nntp, davidsen@tmr.com (bill davidsen) wrote:
> Is there some way I'm missing to disable this reader.conf garbage in in
> 2.3 and return to something sane?
The nnrpd perl authenticator provided with INN parses the old
nnrp.access file. (or at least it did.. I haven't looked in a while.)
> The overhead of parsing hundreds or
> thousands of lines of config, and the lack of simple working examples
> (as opposed to "here are tricky things") makes this look like a
> nightmare compared to nnrp.access.
I'm working on a new config engine which will eliminate the overhead
(after startup) when running nnrpd in daemon mode.
> Writing a stanza per IP address is totally impractical, I'm sure someone
> just didn't get to documenting the real way this works, including which
> fields are requires and which optional.
You should not need to write a stanza per IP address.. Assuming that
all your users can read the same newsgroups, the following would work
(for example):
auth "foobar" {
hosts: "10.0.0.1, 10.0.0.2,
10.0.0.3, &c."
default: "<internal-network>"
}
access "internal" {
users: "<internal-network>"
newsgroups: "*"
access: "Read Post"
}
If each IP address has a different remote user associated with it, then
you can still write a really simple authenticator which will retrieve
the user from an external database for you:
auth "foobar" {
hosts: "same as above"
auth "ipdb /news/etc/customers"
}
...
#!/usr/local/bin/perl
while (<STDIN>) {
chop;
chop if ($_ =~ /\r$/);
if ($_ =~ /^Client-IP: /) {
$ip = $_;
$ip =~ s/^Client-IP: //;
}
}
dbmopen(%hash, "$ARGV[0]", 0600);
if (defined($hash{$ip}) {
print "user:" . $hash{$ip} . "\r\n";
} else {
print STDERR "Unknown IP address $ip\r\n";
exit 1;
}
dbmclose(%hash);
HTH,
--aidan
--
Aidan Cully "Umm.. Could you call back? My house is on fire."
Panix Staff --Tom Waits
aidan@panix.com
Technical Details
Message-ID:
<7m0bet$h9s$1@news.panix.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<7lu1cf$14l2$1@newssvr03-int.news.prodigy.com>Show Full Headers
Complete Article Headers
Message-ID: <7m0bet$h9s$1@news.panix.com> Subject: Re: reader.conf docs? Date: Wed, 07 Jul 1999 00:00:00 +0000 From: aidan@panix.com (Aidan Cully) References: <7lu1cf$14l2$1@newssvr03-int.news.prodigy.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 498270709 Distribution: inet X-Complaints-To: abuse@panix.com X-Trace: news.panix.com 931377437 17724 166.84.0.231 (7 Jul 1999 19:57:17 GMT) Organization: Public Access Networks Corp. NNTP-Posting-Date: 7 Jul 1999 19:57:17 GMT Newsgroups: news.software.nntp