🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83664

Undefined $user in filter_nnrpd.pl?

#83664
From: Michael Grimm
Date: Sun, 14 Nov 2010 14:41
35 lines
2498 bytes
Hi --

I'm running nnrpd (20100814) in daemon mode (plus: -S -p xxx), and user
authentication is achieved using ckpasswd (from file) in readers.conf.

My filter_nnrpd.pl has always been used to access headers (encryption of
sensible data) successfully. Recently, I tried to expand that filter
regarding Cancel-Lock and Cancel-Key addition. In order to generate
user specific locks and keys I'm trying to use $user according: 

,----[ http://www.eyrie.org/~eagle/software/inn/docs/hook-perl.html ]-
| ... if the poster authenticated via AUTHINFO (or if either Perl
| authentication or a readers.conf authentication method is used and
| produces user information), it has access to the authenticated username
| of the poster in the variable $user.
`----

But, whenever I access the variable $user in filter_nnrpd.pl's filter_post
subroutine, I'll end up in:
,----
| nnrpd[123]: Perl function filter_post died: Undefined subroutine &main::filter_post called.
| nnrpd[123]: SERVER perl filtering disabled
`----

Whenever I do hardcode a user like ...
	my $user = "someone"; 
... everything's fine with my code.

What's wrong with my approach? Why isn't $user defined? Is it my setup
with nnrpd in daemon mode, my authentication method, or?

Regards,
Michael
-- 
to let
Technical Details
Message-ID: <ibosfc$24e$1@de-l.enfer-du-nord.net>
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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!reader.enfer-du-nord.net!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <ibosfc$24e$1@de-l.enfer-du-nord.net>
Subject: Undefined $user in filter_nnrpd.pl?
Date: Sun, 14 Nov 2010 14:41:48 +0000
From: Michael Grimm <trashcan@odo.in-berlin.de>
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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!reader.enfer-du-nord.net!.POSTED!not-for-mail
Newsgroups: news.software.nntp
Organization: ATK - Alternative Tierklinik links der Einfalt
Injection-Info: reader.enfer-du-nord.net;
 posting-host="U2FsdGVkX1+EBw0mA9BYVg/O6az5WADSBw3+mJEHVt8=";
 mail-complaints-to="abuse@enfer-du-nord.net"
User-Agent: slrn/pre1.0.0-15/mm/ao (Darwin)
Cancel-Lock: sha1:zP0d8jVdKUIN01TFWs1gns+UfEk=
 sha1:oMMzDBK03RaBzFOd7ZDzmDZbnb4=
Mail-Copies-To: nobody
Lines: 34
X-Original-Bytes: 2184