From 598309218cded289cf29c8f9ba215b09b8a41640 Mon Sep 17 00:00:00 2001 From: Zen Date: Tue, 1 Oct 2024 17:49:37 -0500 Subject: [PATCH] warn about unknown cryptsetup config parameters Signed-off-by: Zen --- src/ugrd/crypto/cryptsetup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ugrd/crypto/cryptsetup.py b/src/ugrd/crypto/cryptsetup.py index 52ba1dfa..2b462e0e 100644 --- a/src/ugrd/crypto/cryptsetup.py +++ b/src/ugrd/crypto/cryptsetup.py @@ -1,5 +1,5 @@ __author__ = 'desultory' -__version__ = '2.5.7' +__version__ = '2.5.8' from zenlib.util import contains @@ -97,6 +97,10 @@ def _validate_cryptsetup_config(self, mapped_name: str) -> None: def _process_cryptsetup_multi(self, mapped_name: str, config: dict) -> None: """ Processes the cryptsetup configuration """ + for parameter in config: + if parameter not in CRYPTSETUP_PARAMETERS: + self.logger.error("[%s] Unknown parameter: %s" % (mapped_name, parameter)) + config = _merge_cryptsetup(self, mapped_name, config) # Merge the config with the existing configuration self.logger.debug("[%s] Processing cryptsetup configuration: %s" % (mapped_name, config)) # Check if the key type is defined in the configuration, otherwise use the default, check if it's valid