aboutsummaryrefslogtreecommitdiffstats
path: root/anteater/src/patch_scan.py
diff options
context:
space:
mode:
authorlhinds <lhinds@redhat.com>2017-11-16 17:03:43 +0000
committerlhinds <lhinds@redhat.com>2017-11-16 17:03:43 +0000
commit21eba438574c13ecd49119ab9a7df882e517f566 (patch)
treea924ff83757897f24525b66467fd49efadacb590 /anteater/src/patch_scan.py
parent8365245c9dc2f8e2ff2adf8aa84162e420747132 (diff)
Implements full path for hash checks of binaries
Previously the hash check would work only against the filename, and not using the relative path. This change uses the whole relative path to allow indentical filenames in different folder locations within the same repo. Also updated the generate-sha256.py script to introduce the same changes. JIRA: RELENG-303 Change-Id: I3a59e015b708eb5a966690b9839e5e15ac5b64c7 Signed-off-by: lhinds <lhinds@redhat.com>
Diffstat (limited to 'anteater/src/patch_scan.py')
-rw-r--r--anteater/src/patch_scan.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/anteater/src/patch_scan.py b/anteater/src/patch_scan.py
index 3097d00..3d29c65 100644
--- a/anteater/src/patch_scan.py
+++ b/anteater/src/patch_scan.py
@@ -84,7 +84,8 @@ def scan_patch(project, patch_file, binary_list, file_audit_list,
global failure
if is_binary(patch_file):
hashlist = get_lists.GetLists()
- binary_hash = hashlist.binary_hash(project, patch_file)
+ split_path = patch_file.split(project + '/', 1)[-1]
+ binary_hash = hashlist.binary_hash(project, split_path)
if not binary_list.search(patch_file):
with open(patch_file, 'rb') as afile:
buf = afile.read()