[PATCH] add encryption passphrase when doing encrypted autopart
Brian C. Lane
bcl at redhat.com
Fri Jul 20 22:42:05 UTC 2012
From: "Brian C. Lane" <bcl at redhat.com>
The AutoPart execute method sets up the needed information, use it when
creating the encrypted partitions.
---
pyanaconda/storage/partitioning.py | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 74eb685..62e0c14 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -75,7 +75,8 @@ def _scheduleImplicitPartitions(storage, disks):
for disk in disks:
if storage.encryptedAutoPart:
fmt_type = "luks"
- fmt_args = {"escrow_cert": storage.autoPartEscrowCert,
+ fmt_args = {"passphrase": storage.encryptionPassphrase,
+ "escrow_cert": storage.autoPartEscrowCert,
"add_backup_passphrase": storage.autoPartAddBackupPassphrase}
else:
if storage.autoPartType == AUTOPART_TYPE_LVM:
@@ -156,11 +157,16 @@ def _schedulePartitions(storage, disks):
request.fstype = storage.liveImage.format.type
if request.encrypted and storage.encryptedAutoPart:
- fstype = "luks"
+ fmt_type = "luks"
+ fmt_args = {"passphrase": storage.encryptionPassphrase,
+ "escrow_cert": storage.autoPartEscrowCert,
+ "add_backup_passphrase": storage.autoPartAddBackupPassphrase}
else:
- fstype = request.fstype
+ fmt_type = request.fstype
+ fmt_args = {}
- dev = storage.newPartition(fmt_type=fstype,
+ dev = storage.newPartition(fmt_type=fmt_type,
+ fmt_args=fmt_args,
size=request.size,
grow=request.grow,
maxsize=request.maxSize,
--
1.7.7.6
More information about the anaconda-patches
mailing list