Skip to content

Commit 5983092

Browse files
committed
warn about unknown cryptsetup config parameters
Signed-off-by: Zen <[email protected]>
1 parent 0bf17c6 commit 5983092

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ugrd/crypto/cryptsetup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'desultory'
2-
__version__ = '2.5.7'
2+
__version__ = '2.5.8'
33

44
from zenlib.util import contains
55

@@ -97,6 +97,10 @@ def _validate_cryptsetup_config(self, mapped_name: str) -> None:
9797

9898
def _process_cryptsetup_multi(self, mapped_name: str, config: dict) -> None:
9999
""" Processes the cryptsetup configuration """
100+
for parameter in config:
101+
if parameter not in CRYPTSETUP_PARAMETERS:
102+
self.logger.error("[%s] Unknown parameter: %s" % (mapped_name, parameter))
103+
100104
config = _merge_cryptsetup(self, mapped_name, config) # Merge the config with the existing configuration
101105
self.logger.debug("[%s] Processing cryptsetup configuration: %s" % (mapped_name, config))
102106
# Check if the key type is defined in the configuration, otherwise use the default, check if it's valid

0 commit comments

Comments
 (0)