[PATCH] Fix python_access on 64bits hosts

Raphaël Barrois raphael.barrois+inn at xelmail.com
Sun Oct 31 01:29:44 UTC 2010


Hi,

I have just completed a standard (gentoo) installation of INN 2.5.1 on a 
64bits host, and it seems that there is an issue with the "python_access" 
method.

Even if I use the following code in my "access" method :

return {"read":"*", "post":"*"}

I get in my logs :

no_read python-dynamic
no_post python-dynamic


While trying to find the cause of this problem, I found out that the while 
loop in charge of converting the content of this dict to an "access vector" in 
the nnrpd/python.c Py_access function was never run.

This seems to come from the use of an "int" for the iterator, whereas the 
Python doc uses a "Py_ssize_t" : http://docs.python.org/c-api/dict.html, 
"PyDict_Next" section.

I have attached a patch fixing this issue ; it compiles and runs fine on my 
host.


Please let me know if you need more information / additional tests / ...

-- 
Raphaël Barrois
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inn-2.5.1-nnrpd-python.patch
Type: text/x-patch
Size: 1336 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20101031/65d4cb9e/attachment.bin>


More information about the inn-workers mailing list