[PATCH] add encryption passphrase when doing encrypted autopart
David Lehman
dlehman at redhat.com
Fri Jul 20 23:46:16 UTC 2012
On Fri, 2012-07-20 at 15:42 -0700, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at 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.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,
More information about the anaconda-patches
mailing list