Hi Marco,

> Even if it's supposed to support abstract AF_UNIX sockets,
> Socket::pack_sockaddr_un pads the structure with NULs, which makes the
> address different.

This probably describes the same issue as
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490660

The fix was queued into Bleadperl, it's relatively small and safe; in
case you want to cherry-pick it:

http://perl5.git.perl.org/perl.git/commitdiff/99f13d4c3419e967e95c5ac6a3af61e9bb0fd3c0

The workaround would be as follows:

# Native sockaddr_un might be broken in Perl's Socket.xs,
# dispatch to replacement if it is the case
*sockaddr_un_native = \&sockaddr_un;
*sockaddr_un = sub {
        my $address = shift;
        if (length ($address) + 2 == length (sockaddr_un_native ($@))) {
                *sockaddr_un = \&sockaddr_un_native;
        } else {
                *sockaddr_un = sub { "\x01\x00".shift };
        }
        return (sockaddr_un ($address, @_));
};

Best Regards,
Lubo

--
Fedora 12 Alpha is out. Get it while it's hot! 
http://fedoraproject.org/get-prerelease




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to