SA Bugzilla – Bug 1559
pyzor will not run
Last modified: 2003-03-13 09:51:19 UTC
Pyzor will not run from within Dns.pm. I have added debug to print out the complete response, and it seem that it (something) thinks that the user's home directory is '/bin' debug: executable for pyzor was found at /usr/bin/pyzor debug: Pyzor is available: /usr/bin/pyzor debug: entering helper-app run mode debug: Pyzor command: /usr/bin/pyzor check < '/tmp/sa.30508.BhnbyN' 2>&1 debug: Pyzor: got response: Traceback (most recent call last): debug: Pyzor: got response: File "/usr/bin/pyzor", line 4, in ? debug: Pyzor: got response: pyzor.client.run() debug: Pyzor: got response: File "/usr/lib/python2.2/site-packages/pyzor/clien t.py", line 934, in run debug: Pyzor: got response: ExecCall().run() debug: Pyzor: got response: File "/usr/lib/python2.2/site-packages/pyzor/clien t.py", line 169, in run debug: Pyzor: got response: os.mkdir(homedir) debug: Pyzor: got response: OSError: [Errno 13] Permission denied: '/bin/.pyzor'
It would seem as though pyzor will run if called from spamd but not if it is called from spamassassin. Also it works perfectly if called directly from the command line, so it looks as though something is corrupting the environment in which spamassassin calls it. It also works fine in 2.50 (release)
Subject: Re: [SAdev] pyzor will not run On Wed, Feb 26, 2003 at 10:36:14PM -0800, bugzilla-daemon@hughes-family.org wrote: > It would seem as though pyzor will run if called from spamd but not if it is > called from spamassassin. Also it works perfectly if called directly from the > command line, so it looks as though something is corrupting the environment in > which spamassassin calls it. It also works fine in 2.50 (release) What comes out of "spamassassin -D < message > /dev/null" ? It's likely that pyzor doesn't exist in the path, or has bad permissions, etc.
The appropriate part of the output of spamasassin -D < msg > /dev/null is debug: Razor2 is available debug: Current PATH is: /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome2/bin:/opt/gnome/bin:/opt/kde3/bin:/opt/kde2/bin:/usr/lib/java/bin:/opt/gnome/bin:. debug: executable for pyzor was found at /usr/bin/pyzor debug: Pyzor is available: /usr/bin/pyzor debug: entering helper-app run mode debug: Pyzor: got response: Traceback (most recent call last): debug: leaving helper-app run mode debug: Pyzor: couldn't grok response "Traceback (most recent call last):" debug: executable for dccproc was found at /usr/local/bin/dccproc So it has found the pyzor executable but this has failed. The original bug report shows the error in more detail (permissions failure on the non-existant directory /bin/.pyzor)
Subject: Re: [SAdev] pyzor will not run On Thu, Feb 27, 2003 at 10:56:16AM -0800, bugzilla-daemon@hughes-family.org wrote: > So it has found the pyzor executable but this has failed. The original bug > report shows the error in more detail (permissions failure on the non-existant > directory /bin/.pyzor) Ok, after some digging, the problem is that Mail::SpamAssassin::Util::portable_getpwuid() is returning the wrong information. For instance, I pass in my UID (501) and end up with: bin:x:1:1:::bin:/bin:/bin/false
Subject: Re: [SAdev] pyzor will not run On Thu, Feb 27, 2003 at 03:47:35PM -0500, Theo Van Dinter wrote: > Ok, after some digging, the problem is that > Mail::SpamAssassin::Util::portable_getpwuid() is returning the wrong > information. Heh. Stupid scalar vs array problem: $ perl -e 'print join(":",t($>)),"\n"; sub t { getpwuid(@_); }' bin:x:1:1:::bin:/bin:/bin/false $ perl -e 'print join(":",t($>)),"\n"; sub t { getpwuid($_[0]); }' felicity:x:501:..... In the first one, getpwuid is expecting a scalar, so @_ gets converted into the # of elements that are being passed == 1. In the second one we pass the first scalar of the array, and things work as expected. I'll have a patch attached shortly. :)
Created attachment 695 [details] fix for the problem
reassigning to myself. waiting for comments for 2.51 inclusion. :)
reassigning to malte. :)
OKAY: That one is really stupid ;-)
committed to 2.5 branch, closing ticket. :)