🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #63875

Python problem in INN 2.3.4?

#63875
From: Gumboot
Date: Wed, 05 Feb 2003 14:17
56 lines
2880 bytes
Hi all,

I've built INN from the .tar.gz sources on a server running Red Hat 
(kernel 2.4.16). I ran configure with "--with-python".

I've brought up the server with nnrppythonauth set to true in inn.conf.
Attempting to connect produces the following response, every time :

And the response string :
% telnet nntp2 119
Trying 666.777.888.999...
Connected to nntp2.
Escape character is '^]'.
502 Internal Error (7).  Goodbye
Connection closed by foreign host.

And the log messages as follows:

% tail /var/log/messages
Feb  5 13:59:54 nntp2 innd: SERVER reload filter.python 
Feb  5 13:59:57 nntp2 nnrpd[21140]: Reading config from 
/usr/news/etc/inn.conf
Feb  5 13:59:57 nntp2 nnrpd[21140]: SERVER perl filtering enabled
Feb  5 13:59:57 nntp2 nnrpd[21140]: python interpreter initialized OK
Feb  5 13:59:57 nntp2 nnrpd[21140]: python: nnrpd authentication class 
instance created
Feb  5 13:59:57 nntp2 nnrpd[21140]: python: authentication module 
successfully hooked into nnrpd
Feb  5 13:59:57 nntp2 nnrpd[21140]: some python methods defined. good.
Feb  5 13:59:57 nntp2 nnrpd[21140]: cslin200.csunix.comp.leeds.ac.uk 
connect
Feb  5 13:59:57 nntp2 nnrpd[21140]: python authenticate_method (type 
connect) returned wrong result
Feb  5 13:59:57 nntp2 nnrpd[21140]: cslin200.csunix.comp.leeds.ac.uk 
times user 0.020 system 0.030 elapsed 0.004
Feb  5 13:59:57 nntp2 nnrpd[21140]: python: close method running, bye!

It's the "authenticate_method (type connect) returned wrong result" bit 
that worries me.

My authenticate method in nnrpd_auth.py is the minimalist :

def authenticate(self, attributes):
   """Called when a reader connects or authenticates"""
   return ( self.authcodes['READPOST'], 1, 1, '*')

but the behaviour is identical when using the sample script.

Incidentally, I'm using python 2.2.2, obtained from python.org a week ago.

Any advice gratefully received (especially if someone points out what an 
idiot I'm being somewhere along the line!)

G

Technical Details
Message-ID: <slrnb42786.13s.news@cslin200.csunix.comp.leeds.ac.uk>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!xara.net!gxn.net!server5.netnews.ja.net!leeds-iss.ac.uk!gph

Show Full Headers
Complete Article Headers
Message-ID: <slrnb42786.13s.news@cslin200.csunix.comp.leeds.ac.uk>
Subject: Python problem in INN 2.3.4?
Date: Wed, 5 Feb 2003 14:17:45 GMT
From: Gumboot <news@ten.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!xara.net!gxn.net!server5.netnews.ja.net!leeds-iss.ac.uk!gph
Newsgroups: news.software.nntp
User-Agent: slrn/0.9.7.4 (Linux)
Sender: usenet@leeds.ac.uk (Usenet admin)
Organization: School of Computing, University of Leeds
Originator: gph@Linux
X-Nntp-Posting-Host: cslin200.csunix.comp.leeds.ac.uk
Lines: 55