Your message dated Fri, 25 May 2012 09:50:22 +0000
with message-id <[email protected]>
and subject line Bug#659075: fixed in perl 5.14.2-11
has caused the Debian Bug report #659075,
regarding perl-base: IO::Socket fails to propagate socket type information to 
accept()ed children
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
659075: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659075
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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@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@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
#!/usr/bin/perl

use warnings;
use strict;

use IO::Socket;

use IO::Socket::INET;

sub printinfo {
  my $s = shift;
  my $label = shift;

  if (defined $s->sockdomain) {
    printf("%s: domain: %d\n", $label, $s->sockdomain);
  } else {
    printf("%s: undefined sockdomain\n", $label);
  }
  if (defined $s->socktype) {
    printf("%s: type: %d\n", $label, $s->socktype);
  } else {
    printf("%s: undefined socktype\n", $label);
  }
}

my $listener = IO::Socket::INET->new(Listen => 1,
                                     LocalAddr => 'localhost',
                                     LocalPort => 2000,
                                     ReuseAddr => 1,
                                     Proto => 'tcp');

printinfo($listener, 'listener');

print ("accepting a connection...\n");
my $new = $listener->accept();

printinfo($new, 'new');



--- /usr/lib/perl/5.14.2/IO/Socket.pm.orig	2012-02-07 21:12:42.000000000 -0500
+++ /usr/lib/perl/5.14.2/IO/Socket.pm	2012-02-07 21:13:57.000000000 -0500
@@ -236,6 +236,8 @@
     $peer = accept($new,$sock)
 	or return;
 
+    ${*$new}{$_} = ${*$sock}{$_} for qw( io_socket_domain io_socket_type io_socket_proto );
+
     return wantarray ? ($new, $peer)
     	      	     : $new;
 }

--- End Message ---
--- Begin Message ---
Source: perl
Source-Version: 5.14.2-11

We believe that the bug you reported is fixed in the latest version of
perl, which is due to be installed in the Debian FTP archive:

libcgi-fast-perl_5.14.2-11_all.deb
  to main/p/perl/libcgi-fast-perl_5.14.2-11_all.deb
libperl-dev_5.14.2-11_amd64.deb
  to main/p/perl/libperl-dev_5.14.2-11_amd64.deb
libperl5.14_5.14.2-11_amd64.deb
  to main/p/perl/libperl5.14_5.14.2-11_amd64.deb
perl-base_5.14.2-11_amd64.deb
  to main/p/perl/perl-base_5.14.2-11_amd64.deb
perl-debug_5.14.2-11_amd64.deb
  to main/p/perl/perl-debug_5.14.2-11_amd64.deb
perl-doc_5.14.2-11_all.deb
  to main/p/perl/perl-doc_5.14.2-11_all.deb
perl-modules_5.14.2-11_all.deb
  to main/p/perl/perl-modules_5.14.2-11_all.deb
perl_5.14.2-11.debian.tar.gz
  to main/p/perl/perl_5.14.2-11.debian.tar.gz
perl_5.14.2-11.dsc
  to main/p/perl/perl_5.14.2-11.dsc
perl_5.14.2-11_amd64.deb
  to main/p/perl/perl_5.14.2-11_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Niko Tyni <[email protected]> (supplier of updated perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 25 May 2012 10:14:00 +0300
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-modules perl-debug libperl5.14 
libperl-dev perl
Architecture: source all amd64
Version: 5.14.2-11
Distribution: unstable
Urgency: low
Maintainer: Niko Tyni <[email protected]>
Changed-By: Niko Tyni <[email protected]>
Description: 
 libcgi-fast-perl - CGI::Fast Perl module
 libperl-dev - Perl library: development files
 libperl5.14 - shared Perl library
 perl       - Larry Wall's Practical Extraction and Report Language
 perl-base  - minimal Perl system
 perl-debug - debug-enabled Perl interpreter
 perl-doc   - Perl documentation
 perl-modules - Core Perl modules
Closes: 659075
Changes: 
 perl (5.14.2-11) unstable; urgency=low
 .
   [ Dominic Hargreaves ]
   * Add patch from Daniel Kahn Gillmor fixing propagation of socket
     type information (Closes: #659075)
 .
   [ Niko Tyni ]
   * Temporarily disable thread tests on kFreeBSD to work around libc breakage.
     (See #672152 and #673711)
   * Remove empty Copyright lines from debian/copyright to appease
     Config::Model.
Checksums-Sha1: 
 30677954937e1906ac04df85adcc885a9f724f96 1729 perl_5.14.2-11.dsc
 6d7425d2eb45b637cc4e4bf1c4418a1296fa6038 138603 perl_5.14.2-11.debian.tar.gz
 d532d502a7fef906335d1bb279f5a82b918fb937 75228 
libcgi-fast-perl_5.14.2-11_all.deb
 780a1a67f53d0db000a6f567b05d352d0a32a8fa 8167450 perl-doc_5.14.2-11_all.deb
 9085aa3d37659b2c65a3ced14d70a8e540c06c34 3441378 perl-modules_5.14.2-11_all.deb
 2f3e1ac82c49df36854f3fc4e6b78c3d916f53c7 1534714 perl-base_5.14.2-11_amd64.deb
 b24ad6ff6b8d448b91c3c399f97a6098d8d14a14 7956716 perl-debug_5.14.2-11_amd64.deb
 2a6fdbfa20e96bb3f24716f62eaabb0110aeb206 1176 libperl5.14_5.14.2-11_amd64.deb
 2fa18c8b866c2e084702b7160ddd0f0363f3b44f 3318362 
libperl-dev_5.14.2-11_amd64.deb
 e1cc2b4c33a5825d1bb73ef775d546f712668e0b 4423430 perl_5.14.2-11_amd64.deb
Checksums-Sha256: 
 09fbaa34692da3e97369764b54a80eceef6a113becd46287e655a2ca56125f07 1729 
perl_5.14.2-11.dsc
 9794ad7f7531614f7ade882af1773638249477106b4dc75a70a282877aacdab2 138603 
perl_5.14.2-11.debian.tar.gz
 0de7553083291c91a4f2aeb9ca037e529790530ba4b42c239c62e1404d0feaeb 75228 
libcgi-fast-perl_5.14.2-11_all.deb
 a79cb493a57609bac700b2e4df4aa11c4955ce1d4ac55efb3b675c01ca358092 8167450 
perl-doc_5.14.2-11_all.deb
 5d372827a9b3a5556836edf354d532dc17c0b32d29d23e396359c97568645704 3441378 
perl-modules_5.14.2-11_all.deb
 e08504ca31bea641e48d38bc2cad0b84d206e77fed3e6c602a18fa6a91901302 1534714 
perl-base_5.14.2-11_amd64.deb
 8feab1034b0233c98966579f73c11db3520b14b7bfdb02f8fc96332bda1e61e4 7956716 
perl-debug_5.14.2-11_amd64.deb
 9daf5c5d750d3224efab01d1e170a65dd030a578d51a8bc1e2b3c4ca57c249c4 1176 
libperl5.14_5.14.2-11_amd64.deb
 6cbdc6a2dfbed140de43041a0df2c204fefeb0d5a2cdc6f689bc36f1eb3f3de5 3318362 
libperl-dev_5.14.2-11_amd64.deb
 e13efdfdef03b5e339721c3fc486647e0db691eefecb171e093a36c7a024e850 4423430 
perl_5.14.2-11_amd64.deb
Files: 
 277b8dc50f9ddc197a10675aee8ae479 1729 perl standard perl_5.14.2-11.dsc
 281f9b94f47678ef32f96de81a57737a 138603 perl standard 
perl_5.14.2-11.debian.tar.gz
 f963e4e4c6a6cf6e678ee97dd2ee23ea 75228 perl optional 
libcgi-fast-perl_5.14.2-11_all.deb
 43d197773fce83e824a29b8d8372a739 8167450 doc optional 
perl-doc_5.14.2-11_all.deb
 eb4c48e6d332cd886426875b681879d1 3441378 perl standard 
perl-modules_5.14.2-11_all.deb
 9914ce18705a1cb339b70114cc91a15e 1534714 perl required 
perl-base_5.14.2-11_amd64.deb
 c20522f1f2bc001eb1961171186d2841 7956716 debug extra 
perl-debug_5.14.2-11_amd64.deb
 fab604d9e8e51351cf3fca5759e6d5bb 1176 libs optional 
libperl5.14_5.14.2-11_amd64.deb
 7e5c33a006ea12794cdbc5fdd82d98a0 3318362 libdevel optional 
libperl-dev_5.14.2-11_amd64.deb
 e5130619b1182a99d467e4d1a7c294a8 4423430 perl standard perl_5.14.2-11_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk+/PZ8ACgkQiyizGWoHLTmRXwCgycMkuMQRS0uvOfERisVfS7+z
8bAAnj/H2aHWmjhiSSGyBu4kRUTS0PyG
=qMRP
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to