[DRE-maint] Bug#788939: ruby-sigar: Function sigar_proc_port_get sometimes does not find valid PID

Piotr Panczyk piotr.panczyk at assecobs.pl
Tue Jun 16 11:52:16 UTC 2015


Package: ruby-sigar
Version: 0.7.2-1
Severity: important
Tags: upstream patch

Dear Maintainer,
There is a problem with sigar_proc_port_get function. While looking for
the process that owns a socket, it assumes that the UID of the process
is the same as the UID of the port, which is not always true. I use Chef
to configure some servers, Chef calls Ohai, which uses the function to
generate the port-process map. When a process was started as root,
opened a socket and then dropped priviliges, the function returns 0,
which causes some problems with Ohai and Chef. I tried deleting the
lines related to skipping processes with different UID - after
installing the rebuilt package everything is working fine. I attach
the patch.

Best regards,
Piotr Panczyk

-- System Information:
Debian Release: 7.8
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.bsd54h0 (SMP w/24 CPU cores)
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 ruby-sigar depends on:
ii  libc6                         2.13-38+deb7u8
ii  libruby1.9.1                  1.9.3.194-8.1+deb7u5
ii  ruby                          1:1.9.3
ii  ruby1.9.1 [ruby-interpreter]  1.9.3.194-8.1+deb7u5

ruby-sigar recommends no packages.

ruby-sigar suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_proc_port_binding.diff
Type: text/x-diff
Size: 410 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20150616/817860b7/attachment.diff>


More information about the Pkg-ruby-extras-maintainers mailing list