mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] add new api entry point to check for meltdown vulnerability
This commit is contained in:
parent
ae6f65141a
commit
b60d8ca822
2 changed files with 13 additions and 0 deletions
|
@ -1460,6 +1460,11 @@ tools:
|
||||||
full: --force
|
full: --force
|
||||||
action: store_true
|
action: store_true
|
||||||
|
|
||||||
|
### tools_reboot()
|
||||||
|
meltdown-spectre-check:
|
||||||
|
action_help: Check if the server is vulnerable to meltdown/spectre
|
||||||
|
api: GET /meltdown-spectre-check
|
||||||
|
|
||||||
subcategories:
|
subcategories:
|
||||||
|
|
||||||
migrations:
|
migrations:
|
||||||
|
|
|
@ -836,6 +836,14 @@ def tools_migrations_state():
|
||||||
return read_json(MIGRATIONS_STATE_PATH)
|
return read_json(MIGRATIONS_STATE_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
def tools_meltdown_spectre_check():
|
||||||
|
"""
|
||||||
|
Check if the installation is vulnerable to meltdown/spectre.
|
||||||
|
"""
|
||||||
|
# source https://askubuntu.com/questions/992137/how-to-check-that-kpti-is-enabled-on-my-ubuntu
|
||||||
|
return {"safe": "cpu_insecure" in open("/proc/cpuinfo")}
|
||||||
|
|
||||||
|
|
||||||
def tools_shell(auth, command=None):
|
def tools_shell(auth, command=None):
|
||||||
"""
|
"""
|
||||||
Launch an (i)python shell in the YunoHost context.
|
Launch an (i)python shell in the YunoHost context.
|
||||||
|
|
Loading…
Add table
Reference in a new issue