fix remaining issue of cryptsetup v1.0.5 (continues r1102)

This commit is contained in:
lars 2008-07-09 23:49:08 +00:00
parent 916b4bebce
commit 87289af11a
2 changed files with 6 additions and 4 deletions

View file

@ -247,8 +247,10 @@ def run_cryptsetup(args):
elif action == "luksDelKey": elif action == "luksDelKey":
if len(args) < 2: raise "WrongArguments", "missing arguments" if len(args) < 2: raise "WrongArguments", "missing arguments"
device = args[0]; del args[0] device = args[0]; del args[0]
cmd_args.insert(-1, action) slot = args[0]; del args[0]
cmd_args.insert(-1, device) cmd_args.append(action)
cmd_args.append(device)
cmd_args.append(slot)
elif action == "isLuks": elif action == "isLuks":
device = args[0]; del args[0] device = args[0]; del args[0]
cmd_args.append(action) cmd_args.append(action)

View file

@ -309,10 +309,10 @@ class CryptoBoxContainer:
self.cbox.prefs["Programs"]["super"], self.cbox.prefs["Programs"]["super"],
self.cbox.prefs["Programs"]["CryptoBoxRootActions"], self.cbox.prefs["Programs"]["CryptoBoxRootActions"],
"program", "cryptsetup", "program", "cryptsetup",
"--batch-mode",
"luksDelKey", "luksDelKey",
self.get_device(), self.get_device(),
"%d" % (keyslot, )]) "%d" % (keyslot, ),
"--batch-mode"])
proc.wait() proc.wait()
if proc.returncode != 0: if proc.returncode != 0:
error_msg = "Could not remove the old luks key: %s" % (proc.stderr.read().strip(), ) error_msg = "Could not remove the old luks key: %s" % (proc.stderr.read().strip(), )