projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9953fc
)
sysctl parsing: Allow missing space before '='
author
Alexander Popov
<alex.popov@linux.com>
Wed, 4 Sep 2024 13:20:15 +0000
(16:20 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Wed, 4 Sep 2024 13:20:15 +0000
(16:20 +0300)
kernel_hardening_checker/__init__.py
patch
|
blob
|
history
diff --git
a/kernel_hardening_checker/__init__.py
b/kernel_hardening_checker/__init__.py
index 2f70b4cc5b02726e65377a891cdf69521c52b3a0..e0f1c97a94e79767b4f840ec18772484132dc5a4 100755
(executable)
--- a/
kernel_hardening_checker/__init__.py
+++ b/
kernel_hardening_checker/__init__.py
@@
-206,7
+206,7
@@
def parse_sysctl_file(mode: StrOrNone, parsed_options: Dict[str, str], fname: st
sys.exit(f'[!] ERROR: unable to open {fname}, are you sure it exists?')
with open(fname, 'r', encoding='utf-8') as f:
- sysctl_pattern = re.compile(r"[a-zA-Z0-9/\._-]+ =.*$")
+ sysctl_pattern = re.compile(r"[a-zA-Z0-9/\._-]+
?
=.*$")
for line in f.readlines():
line = line.strip()
if not sysctl_pattern.match(line):