Bug#628005: netstat -p parses commandline wrong

Jörg Sommer joerg at alea.gnuu.de
Thu May 26 10:50:20 UTC 2011


Package: net-tools
Version: 1.60-24
Severity: normal

Hi,

dictd sets the commandline to »dictd 1.12.0: 0/0« and netstat -tlp says:

tcp        0      0 localhost:dict          *:*                     LISTEN      1351/0

The command name is wrong.

Here is script to reproduce it:

% perl -W <<\__EOP
use IO::Socket;

my $s = new IO::Socket::INET(
  LocalHost => 'localhost',
  LocalPort => '32221',
  Proto => 'tcp',
  Listen => 1,
  Reuse => 1)
  || die "Could not create socket: $!\n";

$0 = 'xxx 1.2.3: 0/0';

system("netstat -ntpl 2>/dev/null |grep 32221; cat /proc/$$/cmdline");
print "\n";
__EOP
tcp        0      0 127.0.0.1:32221         0.0.0.0:*               LISTEN      7816/0
xxx 1.2.3: 0/0

Bye, Jörg

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.39.ledtest-dirty
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages net-tools depends on:
ii  libc6                         2.13-4     Embedded GNU C Library: Shared lib

net-tools recommends no packages.

net-tools suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature http://en.wikipedia.org/wiki/OpenPGP
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-tools-maintainers/attachments/20110526/2d4433f2/attachment.pgp>


More information about the Pkg-net-tools-maintainers mailing list