Bug#486698: libauthen-sasl-cyrus-perl WRITE bug

Sergio Gelato Sergio.Gelato at astro.su.se
Thu Feb 26 17:46:54 UTC 2009


tags 486698 +patch
thanks

I think I may have a fix for this bug.

I'm getting very similar symptoms (LDAP search causing the script to
exit with code 141; I didn't try to catch SIGPIPE). The script works
under etch but fails under lenny. Stepping through with the perl
debugger I found out that in the following piece of code:

Net::LDAP::_sendmesg(/usr/share/perl5/Net/LDAP.pm:797):
797:	    my $n = syswrite($socket, substr($$to_send, $offset, 15000), 15000)
798:	      or return _error($ldap, $mesg, LDAP_LOCAL_ERROR,"$!");

syswrite() always returns 1. The crash occurs during the third iteration
through the loop (at which point $offset == 2).

If I apply the attached patch to Authen/SASL/Cyrus/Security.pm
syswrite() returns the actual length written.

I'm only 99% sure that this is the same bug as found by Wouter Verhelst;
maybe he can try my patch and report back? In any case, the patch is worth 
applying.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 486698.diff
Type: text/x-diff
Size: 573 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090226/0b02a03b/attachment-0001.diff 


More information about the pkg-perl-maintainers mailing list