Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
6bd5fe15
Commit
6bd5fe15
authored
3 years ago
by
Alexander Popov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check type
parent
25f10dd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
__init__.py
kconfig_hardened_check/__init__.py
+9
-5
No files found.
kconfig_hardened_check/__init__.py
View file @
6bd5fe15
...
...
@@ -108,8 +108,12 @@ class OptCheck:
class
KconfigCheck
(
OptCheck
):
@property
def
type
(
self
):
return
"kconfig"
def
table_print
(
self
,
_mode
,
with_results
):
print
(
'CONFIG_{:<33}|{:^
11}|{:^10}|{:^18}'
.
format
(
self
.
nam
e
,
self
.
expected
,
self
.
decision
,
self
.
reason
),
end
=
''
)
print
(
'CONFIG_{:<33}|{:^
7}|{:^11}|{:^10}|{:^18}'
.
format
(
self
.
name
,
self
.
typ
e
,
self
.
expected
,
self
.
decision
,
self
.
reason
),
end
=
''
)
if
with_results
:
print
(
'| {}'
.
format
(
self
.
result
),
end
=
''
)
...
...
@@ -135,7 +139,7 @@ class VerCheck:
def
table_print
(
self
,
_mode
,
with_results
):
ver_req
=
'kernel version >= '
+
str
(
self
.
ver_expected
[
0
])
+
'.'
+
str
(
self
.
ver_expected
[
1
])
print
(
'{:<
82
}'
.
format
(
ver_req
),
end
=
''
)
print
(
'{:<
90
}'
.
format
(
ver_req
),
end
=
''
)
if
with_results
:
print
(
'| {}'
.
format
(
self
.
result
),
end
=
''
)
...
...
@@ -154,7 +158,7 @@ class PresenceCheck:
return
True
def
table_print
(
self
,
_mode
,
with_results
):
print
(
'CONFIG_{:<
75
}'
.
format
(
self
.
name
+
' is present'
),
end
=
''
)
print
(
'CONFIG_{:<
83
}'
.
format
(
self
.
name
+
' is present'
),
end
=
''
)
if
with_results
:
print
(
'| {}'
.
format
(
self
.
result
),
end
=
''
)
...
...
@@ -186,7 +190,7 @@ class ComplexOptCheck:
def
table_print
(
self
,
mode
,
with_results
):
if
mode
==
'verbose'
:
print
(
' {:
78
}'
.
format
(
'<<< '
+
self
.
__class__
.
__name__
+
' >>>'
),
end
=
''
)
print
(
' {:
86
}'
.
format
(
'<<< '
+
self
.
__class__
.
__name__
+
' >>>'
),
end
=
''
)
if
with_results
:
print
(
'| {}'
.
format
(
self
.
result
),
end
=
''
)
for
o
in
self
.
opts
:
...
...
@@ -630,7 +634,7 @@ def print_checklist(mode, checklist, with_results):
if
with_results
:
sep_line_len
+=
30
print
(
'='
*
sep_line_len
)
print
(
'{:^40}|{:^
11}|{:^10}|{:^18}'
.
format
(
'kconfig option nam
e'
,
'desired val'
,
'decision'
,
'reason'
),
end
=
''
)
print
(
'{:^40}|{:^
7}|{:^11}|{:^10}|{:^18}'
.
format
(
'option name'
,
'typ
e'
,
'desired val'
,
'decision'
,
'reason'
),
end
=
''
)
if
with_results
:
print
(
'| {}'
.
format
(
'check result'
),
end
=
''
)
print
()
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment