Skip to content

Commit

Permalink
Don't print the warning about ARCH_MMAP_RND_BITS in the json mode
Browse files Browse the repository at this point in the history
  • Loading branch information
a13xp0p0v committed Jan 16, 2024
1 parent 65ff79d commit 011315f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel_hardening_checker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@ def main():
override_expected_value(config_checklist, 'CONFIG_ARCH_MMAP_RND_BITS', mmap_rnd_bits_max)
else:
# remove the CONFIG_ARCH_MMAP_RND_BITS check to avoid false results
print('[-] Can\'t check CONFIG_ARCH_MMAP_RND_BITS without CONFIG_ARCH_MMAP_RND_BITS_MAX')
if mode != 'json':
print('[-] Can\'t check CONFIG_ARCH_MMAP_RND_BITS without CONFIG_ARCH_MMAP_RND_BITS_MAX')
config_checklist[:] = [o for o in config_checklist if o.name != 'CONFIG_ARCH_MMAP_RND_BITS']

# now everything is ready, perform the checks
Expand Down

0 comments on commit 011315f

Please sign in to comment.