Skip to content

Commit

Permalink
scripts: remove NONFATAL from security-check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fanquake committed May 14, 2020
1 parent 061acf6 commit 13f606b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions contrib/devtools/security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
OBJDUMP_CMD = os.getenv('OBJDUMP', '/usr/bin/objdump')
OTOOL_CMD = os.getenv('OTOOL', '/usr/bin/otool')
NONFATAL = {} # checks which are non-fatal for now but only generate a warning

def check_ELF_PIE(executable):
'''
Expand Down Expand Up @@ -279,18 +278,12 @@ def identify_executable(executable):
continue

failed = []
warning = []
for (name, func) in CHECKS[etype]:
if not func(filename):
if name in NONFATAL:
warning.append(name)
else:
failed.append(name)
failed.append(name)
if failed:
print('%s: failed %s' % (filename, ' '.join(failed)))
retval = 1
if warning:
print('%s: warning %s' % (filename, ' '.join(warning)))
except IOError:
print('%s: cannot open' % filename)
retval = 1
Expand Down

0 comments on commit 13f606b

Please sign in to comment.