summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-10-24 01:21:34 +0300
committerDevaev Maxim <[email protected]>2019-10-24 01:21:34 +0300
commit97e2d9128c37805ba649807f5f923d1d1e92907f (patch)
tree36ddaa7318cea97edf55ef994052b14a28e36305 /kvmd/plugins/msd
parent372bf2a4afc93726ad63090202b517c939a183d9 (diff)
strict file validation
Diffstat (limited to 'kvmd/plugins/msd')
-rw-r--r--kvmd/plugins/msd/otg.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kvmd/plugins/msd/otg.py b/kvmd/plugins/msd/otg.py
index ca57a932..839fbc1f 100644
--- a/kvmd/plugins/msd/otg.py
+++ b/kvmd/plugins/msd/otg.py
@@ -29,7 +29,7 @@ from typing import AsyncGenerator
from ...yamlconf import Option
-from ...validators.os import valid_abs_path_exists
+from ...validators.os import valid_abs_dir
from ...validators.os import valid_command
from . import MsdOperationError
@@ -48,7 +48,7 @@ class Plugin(BaseMsd):
def get_plugin_options(cls) -> Dict:
sudo = ["/usr/bin/sudo", "--non-interactive"]
return {
- "storage": Option("/var/lib/kvmd/msd", type=valid_abs_path_exists, unpack_as="storage_path"),
+ "storage": Option("/var/lib/kvmd/msd", type=valid_abs_dir, unpack_as="storage_path"),
"remount_cmd": Option([*sudo, "/usr/bin/kvmd-helper-otgmsd-remount", "{mode}"], type=valid_command),
"unlock_cmd": Option([*sudo, "/usr/bin/kvmd-helper-otgmsd-unlock", "unlock"], type=valid_command),
}