[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#686352: [collection/objdump-info] Handle setugid files, too



Package: lintian
Version: 2.5.10.1
Severity: normal
Tags: patch

Hi,

Just like the strings collection in #533618, the objdump-info collection
only operates on files for which the file-info starts with "ELF"; this
will fail if Lintian is run as root (as in a pbuilder environment) and
file(1) reports "setuid", "setgid" or a similar string before the "ELF"
keyword.

What do you think about the trivial attached patch that changes the
check in the same way as the strings check earlier and other checks in
the Lintian source?

Thanks a lot for writing and maintaining this excellent tool!

G'luck,
Peter

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: i386 (i686)

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

Versions of packages lintian depends on:
ii  binutils                       2.22-6.1
ii  bzip2                          1.0.6-4
ii  diffstat                       1.55-3
ii  file                           5.11-2
ii  gettext                        0.18.1.1-9
ii  hardening-includes             2.2
ii  intltool-debian                0.35.0+20060710.1
ii  libapt-pkg-perl                0.1.26+b1
ii  libarchive-zip-perl            1.30-6
ii  libc-bin                       2.13-35
ii  libclass-accessor-perl         0.34-1
ii  libclone-perl                  0.31-1+b2
ii  libdpkg-perl                   1.16.8
ii  libemail-valid-perl            0.190-1
ii  libipc-run-perl                0.91-1
ii  libparse-debianchangelog-perl  1.2.0-1
ii  libtimedate-perl               1.2000-1
ii  liburi-perl                    1.60-1
ii  locales                        2.13-35
ii  man-db                         2.6.2-1
ii  patchutils                     0.3.2-1.1
ii  perl [libdigest-sha-perl]      5.14.2-12

lintian recommends no packages.

Versions of packages lintian suggests:
ii  binutils-multiarch     2.22-6.1
ii  dpkg-dev               1.16.8
ii  libhtml-parser-perl    3.69-2
pn  libperlio-gzip-perl    <none>
ii  libtext-template-perl  1.45-2
ii  man-db                 2.6.2-1
ii  xz-utils [lzma]        5.1.1alpha+20120614-1

-- no debconf information
From 0a2d045682e54482e8b6d7f80f1c40c9ebf18471 Mon Sep 17 00:00:00 2001
From: Peter Pentchev <roam@ringlet.net>
Date: Fri, 31 Aug 2012 16:23:54 +0300
Subject: [PATCH] Collect objdump info from set[ug]id ELF files too.

---
 collection/objdump-info |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/collection/objdump-info b/collection/objdump-info
index 097124b..d23ef3f 100755
--- a/collection/objdump-info
+++ b/collection/objdump-info
@@ -58,7 +58,7 @@ $opts{pipe_in}->blocking(1);
 foreach my $bin ($info->sorted_index) {
     my $finfo = $info->file_info ($bin);
 
-    if ($finfo =~ m/^\bELF\b/) {
+    if ($finfo =~ m/^[^,]*\bELF\b/) {
         printf {$opts{pipe_in}} "%s\0", $bin;
     }
 }
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


Reply to: