From: "Brian C. Lane" bcl@redhat.com
This fixes using kickstart to run encrypted autopart.
What it does not do is handle missing passphases. That should, I think, be handled in the storage spoke. It should not let the install continue until they have been entered.
Brian C. Lane (1): add encryption passphrase when doing encrypted autopart
pyanaconda/storage/partitioning.py | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
From: "Brian C. Lane" bcl@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,
On Fri, 2012-07-20 at 15:42 -0700, Brian C. Lane wrote:
From: "Brian C. Lane" bcl@redhat.com
Looks good. Ack.
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.fstypefmt_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,
anaconda-patches@lists.fedorahosted.org