Your message dated Tue, 05 Jun 2012 17:34:44 +0000
with message-id <[email protected]>
and subject line Bug#659075: fixed in perl 5.16.0-1
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.16.0-1

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.16.0-1_all.deb
  to main/p/perl/libcgi-fast-perl_5.16.0-1_all.deb
libperl-dev_5.16.0-1_i386.deb
  to main/p/perl/libperl-dev_5.16.0-1_i386.deb
libperl5.16_5.16.0-1_i386.deb
  to main/p/perl/libperl5.16_5.16.0-1_i386.deb
perl-base_5.16.0-1_i386.deb
  to main/p/perl/perl-base_5.16.0-1_i386.deb
perl-debug_5.16.0-1_i386.deb
  to main/p/perl/perl-debug_5.16.0-1_i386.deb
perl-doc_5.16.0-1_all.deb
  to main/p/perl/perl-doc_5.16.0-1_all.deb
perl-modules_5.16.0-1_all.deb
  to main/p/perl/perl-modules_5.16.0-1_all.deb
perl_5.16.0-1.debian.tar.gz
  to main/p/perl/perl_5.16.0-1.debian.tar.gz
perl_5.16.0-1.dsc
  to main/p/perl/perl_5.16.0-1.dsc
perl_5.16.0-1_i386.deb
  to main/p/perl/perl_5.16.0-1_i386.deb
perl_5.16.0.orig.tar.bz2
  to main/p/perl/perl_5.16.0.orig.tar.bz2



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.
Dominic Hargreaves <[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: Tue, 05 Jun 2012 13:34:00 +0100
Source: perl
Binary: perl-base libcgi-fast-perl perl-doc perl-modules perl-debug libperl5.16 
libperl-dev perl
Architecture: source all i386
Version: 5.16.0-1
Distribution: experimental
Urgency: low
Maintainer: Niko Tyni <[email protected]>
Changed-By: Dominic Hargreaves <[email protected]>
Description: 
 libcgi-fast-perl - CGI::Fast Perl module
 libperl-dev - Perl library: development files
 libperl5.16 - 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.16.0-1) experimental; urgency=low
 .
   * New upstream release
     - update debian/copyright
     - update Breaks versions in debian/control for dual-lived modules
     - remove Provides/Replaces/Breaks for removed modules
       libdevel-dprof-perl, libperl4-corelibs-perl, libshell-perl
     - add Provides/Replaces/Breaks for new libcpan-meta-requirements-perl
     - add new files to perl-base to keep it self-contained
   * Add patch from Daniel Kahn Gillmor fixing propagation of socket
     type information (Closes: #659075)
   * Fix test failure with t/op/getpid.t on kFreeBSD by including a
     linuxthreads version check
Checksums-Sha1: 
 4bcde4d6a41361f713ad20db46d61b18c4789fce 1717 perl_5.16.0-1.dsc
 56fb8097ff3e472f7a057848b37cb9ede7662b74 13568573 perl_5.16.0.orig.tar.bz2
 fe181df73328613a51f3dedfd9ebfea1c449a976 119726 perl_5.16.0-1.debian.tar.gz
 901091aa908ed29f99944ba526b4fb704798d85f 73860 
libcgi-fast-perl_5.16.0-1_all.deb
 31a4779bef0ecc56d996339d7a6650cfbcf7fd4f 7980084 perl-doc_5.16.0-1_all.deb
 f92aa50bbea24d15d6f6f5f32ab16c6552733af7 3865906 perl-modules_5.16.0-1_all.deb
 0e40ed500fe9b56fd1aba75863a8c9c97f32dc31 1526412 perl-base_5.16.0-1_i386.deb
 cd21b280c607d74d0356d28e35c2976365a093e6 9260848 perl-debug_5.16.0-1_i386.deb
 b9cfb55d94abc3dd04fd8fe9346d047b391e05a5 764084 libperl5.16_5.16.0-1_i386.deb
 9c7a2f56a7f8b74a4f4d09c559ecba9a39a8048b 3160316 libperl-dev_5.16.0-1_i386.deb
 b5ca557c389a8c0ee2f1eb21f754e77aa259303d 3710244 perl_5.16.0-1_i386.deb
Checksums-Sha256: 
 9d73c1883f876bd7ffdb944ec72a4cab0e560a49b39e10b65f4a55b584b9d7df 1717 
perl_5.16.0-1.dsc
 8c1d25e92a5760e84f77baa57fde5606fd6e95ec992408d36fa53c47162721d1 13568573 
perl_5.16.0.orig.tar.bz2
 ffefa881b0e9b1ca817d29d8e00bb0ee4b059dae8a969ba9c38b30b9b986c7a3 119726 
perl_5.16.0-1.debian.tar.gz
 9af5fbe15b69b62faf9ad2bb4a11b468093dd7c4f06378b86db94cca526dfec5 73860 
libcgi-fast-perl_5.16.0-1_all.deb
 2827fe0602ba203227dce62488f0d915cbad6e8fe138b123b0862d30d8435629 7980084 
perl-doc_5.16.0-1_all.deb
 6c993e8e60df426715b9643220bed9ba276475f67fa2c50eca74f9e6b9e01e50 3865906 
perl-modules_5.16.0-1_all.deb
 f8aca5a84e8b3cae82f83a0cd122ff80c22fd7d9e1b927d78c1c50658243c635 1526412 
perl-base_5.16.0-1_i386.deb
 7755e553d878e2cdc85c11fe9bb61bc755f57c672e372fa1c289c4a477178526 9260848 
perl-debug_5.16.0-1_i386.deb
 5298d1c4da35bf90e346fd8a8e8ed17d22a2fd8c8d1d7da5af5d76a5605bfc76 764084 
libperl5.16_5.16.0-1_i386.deb
 4a5977d90cb64c8b963e75444c5dbf70f48bb8c364965a64f96dc9adbd95e7fb 3160316 
libperl-dev_5.16.0-1_i386.deb
 431b0804d9d61ef25582c3a55d74dade3b901ed0a154f252631e0798fe566f39 3710244 
perl_5.16.0-1_i386.deb
Files: 
 adce62471aa7bd179bd28f7e6faada78 1717 perl standard perl_5.16.0-1.dsc
 15a2f95fb27231e10998240f13acf961 13568573 perl standard 
perl_5.16.0.orig.tar.bz2
 11c8257b8602b692b7f4eff241ee05af 119726 perl standard 
perl_5.16.0-1.debian.tar.gz
 23b461735e22857582f557c6260a1bbc 73860 perl optional 
libcgi-fast-perl_5.16.0-1_all.deb
 94477a66fdf225f97a89ce11a6ac7934 7980084 doc optional perl-doc_5.16.0-1_all.deb
 edfc21a145cc65d2842a0e3aa4f7b488 3865906 perl standard 
perl-modules_5.16.0-1_all.deb
 8ea4ed071b6fd86538c2a195ab922f92 1526412 perl required 
perl-base_5.16.0-1_i386.deb
 7cdd52d1c4e01fce1af473d97bff3b56 9260848 debug extra 
perl-debug_5.16.0-1_i386.deb
 54f42f652814aa89e3724bfc275593f1 764084 libs optional 
libperl5.16_5.16.0-1_i386.deb
 40b1443022a8d73e8247c61318a96303 3160316 libdevel optional 
libperl-dev_5.16.0-1_i386.deb
 ed19e4d8db080b7ada51090296d79e96 3710244 perl standard perl_5.16.0-1_i386.deb

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

iD8DBQFPzgpBYzuFKFF44qURAuuHAKDAdg3gBbtZDmPSayq7Y8N977SQnQCfUj5e
Xlqr9Xfrygm+bHZfY6pMYZU=
=OnWE
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to