forked from pool/rpmlint
Marcus Meissner
aba168ae61
- issue_68_BinariesCheck_lower_memory.patch: split into seperate patches issue_68_BinariesCheck_lower_memory-1.patch issue_68_BinariesCheck_lower_memory-2.patch issue_68_BinariesCheck_lower_memory-3.patch issue_68_BinariesCheck_lower_memory-4.patch and unfuzzed patch number 3. OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=424
38 lines
1.5 KiB
Diff
38 lines
1.5 KiB
Diff
From c5871542684bf1439d96f2430fe4f0010070e4db Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
|
Date: Sun, 7 Feb 2016 10:10:51 +0200
|
|
Subject: [PATCH] BinariesCheck: avoid false chroot w/o chdir when objdump
|
|
fails
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1305302
|
|
---
|
|
BinariesCheck.py | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/BinariesCheck.py b/BinariesCheck.py
|
|
index b2c030e..33dfae5 100644
|
|
--- a/BinariesCheck.py
|
|
+++ b/BinariesCheck.py
|
|
@@ -210,7 +210,10 @@ def __init__(self, pkg, path, file, is_ar, is_shlib):
|
|
# on a server like postfix
|
|
res = Pkg.getstatusoutput(
|
|
('env', 'LC_ALL=C', 'objdump', '-d', path))
|
|
- if not res[0]:
|
|
+ if res[0]:
|
|
+ printWarning(pkg, 'binaryinfo-objdump-failed', file)
|
|
+ self.chroot_near_chdir = True # avoid false positive
|
|
+ else:
|
|
call = []
|
|
# we want that :
|
|
# 401eb8: e8 c3 f0 ff ff callq 400f80 <free@plt>
|
|
@@ -645,6 +648,9 @@ def check_binary(self, pkg):
|
|
'binaryinfo-readelf-failed',
|
|
'''Executing readelf on this file failed, all checks could not be run.''',
|
|
|
|
+'binaryinfo-objdump-failed',
|
|
+'''Executing objdump on this file failed, all checks could not be run.''',
|
|
+
|
|
'binaryinfo-tail-failed',
|
|
'''Reading trailing bytes of this file failed, all checks could not be run.''',
|
|
|