projects
/
kconfig-hardened-check.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the Ubuntu example configs
[kconfig-hardened-check.git]
/
kernel_hardening_checker
/
engine.py
diff --git
a/kernel_hardening_checker/engine.py
b/kernel_hardening_checker/engine.py
index 4e4eee91b413c1b1f1408b92645e285a9aab1539..52ae76153ae15ef55f11b48c73782a44e0342e01 100644
(file)
--- a/
kernel_hardening_checker/engine.py
+++ b/
kernel_hardening_checker/engine.py
@@
-57,6
+57,10
@@
class OptCheck:
self.state = None
self.result = None
self.state = None
self.result = None
+ @property
+ def type(self):
+ return None
+
def check(self):
# handle the 'is present' check
if self.expected == 'is present':
def check(self):
# handle the 'is present' check
if self.expected == 'is present':
@@
-104,7
+108,7
@@
class OptCheck:
class KconfigCheck(OptCheck):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class KconfigCheck(OptCheck):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- self.name =
'CONFIG_' + self.name
+ self.name =
f'CONFIG_{self.name}'
@property
def type(self):
@property
def type(self):
@@
-179,7
+183,8
@@
class ComplexOptCheck:
def table_print(self, mode, with_results):
if mode == 'verbose':
def table_print(self, mode, with_results):
if mode == 'verbose':
- print(f' {"<<< " + self.__class__.__name__ + " >>>":87}', end='')
+ class_name = f'<<< {self.__class__.__name__} >>>'
+ print(f' {class_name:87}', end='')
if with_results:
print(f'| {colorize_result(self.result)}', end='')
for o in self.opts:
if with_results:
print(f'| {colorize_result(self.result)}', end='')
for o in self.opts: