🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Gumboot Wed, 05 Feb 2003 14:17
Python problem in INN 2.3.4?
#63875
Author: 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

Re: Python problem in INN 2.3.4?
#63897
Author: Jeffrey M. Vinocur
Date: Thu, 06 Feb 2003 02:44
26 lines
1891 bytes
In article <slrnb42786.13s.news@cslin200.csunix.comp.leeds.ac.uk>,
Gumboot  <news@ten.com> wrote:
>
>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".
>
>Feb  5 13:59:57 nntp2 nnrpd[21140]: python authenticate_method (type 
>connect) returned wrong result
>
>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.

Hmm.  That looks approximately right to me, but I don't do
Python.  However, there is somebody familiar with the INN Python
stuff reading the inn-workers mailing list, so perhaps you'll
have more luck asking your question there.

-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Python problem in INN 2.3.4?
#63914
Author: Gumboot
Date: Thu, 06 Feb 2003 09:02
11 lines
1164 bytes
<snip>

> there is somebody familiar with the INN Python
> stuff reading the inn-workers mailing list, so perhaps you'll
> have more luck asking your question there.

Cheers for that, will do.

G

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads