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:
f54d736
)
Handle the case of denied permission in the autodetect mode
author
Alexander Popov
<alex.popov@linux.com>
Sat, 16 Nov 2024 13:12:17 +0000
(16:12 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Sat, 16 Nov 2024 13:12:17 +0000
(16:12 +0300)
kernel_hardening_checker/__init__.py
patch
|
blob
|
history
diff --git
a/kernel_hardening_checker/__init__.py
b/kernel_hardening_checker/__init__.py
index 87b6e771d6f4c2d10b1ea910a9747f9fe4c19c44..58c3843579843e2eade2033241d4a77831703fca 100755
(executable)
--- a/
kernel_hardening_checker/__init__.py
+++ b/
kernel_hardening_checker/__init__.py
@@
-38,6
+38,8
@@
def _open(file: str) -> TextIO:
return open(file, 'rt', encoding='utf-8')
except FileNotFoundError:
sys.exit(f'[!] ERROR: unable to open {file}, are you sure it exists?')
+ except PermissionError:
+ sys.exit(f'[!] ERROR: unable to open {file}, permission denied')
def detect_kconfig(version_fname: str) -> Tuple[StrOrNone, str]: