Skip to content

Commit

Permalink
Skip ELF-only sec-hard checks on non-ELF binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Jun 7, 2018
1 parent 2802e32 commit 341a22a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qa/zcash/full_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def check_security_hardening():
# PIE, RELRO, Canary, and NX are tested by make check-security.
ret &= subprocess.call(['make', '-C', repofile('src'), 'check-security']) == 0

# The remaining checks are only for ELF binaries
# Assume that if zcashd is an ELF binary, they all are
with open(repofile('src/zcashd'), 'rb') as f:
magic = f.read(4)
if not magic.startswith(b'\x7fELF'):
return ret

ret &= test_rpath_runpath('src/zcashd')
ret &= test_rpath_runpath('src/zcash-cli')
ret &= test_rpath_runpath('src/zcash-gtest')
Expand Down

0 comments on commit 341a22a

Please sign in to comment.