From 87289af11a97e2046bd4536fcbe512f4c20a4c2d Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 9 Jul 2008 23:49:08 +0000 Subject: [PATCH] fix remaining issue of cryptsetup v1.0.5 (continues r1102) --- bin/CryptoBoxRootActions | 6 ++++-- src/cryptobox/core/container.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/CryptoBoxRootActions b/bin/CryptoBoxRootActions index a59b464..3f2e534 100755 --- a/bin/CryptoBoxRootActions +++ b/bin/CryptoBoxRootActions @@ -247,8 +247,10 @@ def run_cryptsetup(args): elif action == "luksDelKey": if len(args) < 2: raise "WrongArguments", "missing arguments" device = args[0]; del args[0] - cmd_args.insert(-1, action) - cmd_args.insert(-1, device) + slot = args[0]; del args[0] + cmd_args.append(action) + cmd_args.append(device) + cmd_args.append(slot) elif action == "isLuks": device = args[0]; del args[0] cmd_args.append(action) diff --git a/src/cryptobox/core/container.py b/src/cryptobox/core/container.py index 04a4dc6..9338854 100644 --- a/src/cryptobox/core/container.py +++ b/src/cryptobox/core/container.py @@ -309,10 +309,10 @@ class CryptoBoxContainer: self.cbox.prefs["Programs"]["super"], self.cbox.prefs["Programs"]["CryptoBoxRootActions"], "program", "cryptsetup", - "--batch-mode", "luksDelKey", self.get_device(), - "%d" % (keyslot, )]) + "%d" % (keyslot, ), + "--batch-mode"]) proc.wait() if proc.returncode != 0: error_msg = "Could not remove the old luks key: %s" % (proc.stderr.read().strip(), )