Bug#659075: perl-base: IO::Socket fails to propagate socket type information to accept()ed children

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Feb 8 03:07:14 UTC 2012


Subject: perl-base: IO::Socket fails to propagate socket type information to accept()ed children
Package: perl-base
Version: 5.14.2-6
Severity: normal
Tags: upstream patch
Forwarded: https://rt.cpan.org/Ticket/Display.html?id=61577

Running the attached test.pl shows the IO::Socket objects returned by
accept() don't retain the domain, protocol, or type information from the
listening socket, despite clearly sharing all of those features.

0 dkg at pip:~$ perl test.pl & sleep 1; nc localhost 2000; wait
[1] 31622
listener: domain: 2
listener: type: 1
accepting a connection...
new: undefined sockdomain
new: undefined socktype
[1]+  Done                    perl test.pl
0 dkg at pip:~$

The attached patch to IO/Socket.pm resolves the issue.

Note that this patch is intended to resolve CPAN's #61577 (as noted in
the Forwarded field), but that ticket itself is reputed to be the cause
of https://rt.cpan.org/Public/Bug/Display.html?id=68282, which is
reported to be the same as http://bugs.debian.org/607674 (reported by
intrigeri, cc'ed here).  I'm unable to replicate #607674 at the moment
myself, however, so i can't verify that this fix to IO::Socket would
result in fixing 607674.

Anyway, perhaps this patch could be considered for inclusion in debian?
Upstream would be better, of course, but upstream appears to be
remarkably unresponsive for what seems to me like a straightforward fix.

        --dkg

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages perl-base depends on:
ii  dpkg   1.16.1.2
ii  libc6  2.13-24

perl-base recommends no packages.

Versions of packages perl-base suggests:
ii  perl  5.14.2-6

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pl
Type: text/x-perl
Size: 850 bytes
Desc: test/demonstration script
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20120207/65c760ab/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: propagate-io-socket-details-to-accepted-children.diff
Type: text/x-diff
Size: 382 bytes
Desc: patch to fix the issue
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20120207/65c760ab/attachment.diff>


More information about the Perl-maintainers mailing list