From c5871542684bf1439d96f2430fe4f0010070e4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= 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 @@ -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.''',