Skip to content

Commit

Permalink
warn about unknown cryptsetup config parameters
Browse files Browse the repository at this point in the history
Signed-off-by: Zen <[email protected]>
  • Loading branch information
desultory committed Oct 1, 2024
1 parent 0bf17c6 commit 5983092
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ugrd/crypto/cryptsetup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__author__ = 'desultory'
__version__ = '2.5.7'
__version__ = '2.5.8'

from zenlib.util import contains

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5983092

Please sign in to comment.