Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   encrypted device support in kickstart (http://www.linux-archive.org/ubuntu-kernel-team/37241-encrypted-device-support-kickstart.html)

Chris Lumens 01-14-2008 04:40 PM

encrypted device support in kickstart
 
Unless I'm missing something, is adding encrypted device support to
kickstart as simple as the attached patch? I've already added the
appropriate syntax bits to pykickstart. Does this end up behaving the
same way the UI does, especially regarding handling missing passphrases?

- Chris
diff --git a/kickstart.py b/kickstart.py
index b648625..bc5d085 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -138,6 +138,10 @@ class AutoPart(commands.autopart.FC3_AutoPart):
# if you want it
self.handler.id.instClass.setDefaultPartitioning(s elf.handler.id, doClear = 0)

+ if self.encrypted:
+ self.handler.id.partitions.autoEncrypt = True
+ self.handler.id.partitions.autoEncryptPass = self.passphrase
+
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])

class AutoStep(commands.autostep.FC3_AutoStep):
@@ -512,6 +516,9 @@ class Partition(commands.partition.FC4_Partition):
if pd.fsopts != "":
request.fsopts = pd.fsopts

+ if pd.encrypted:
+ request.encryption = cryptodev.LUKSDevice(passphrase=pd.passphrase, format=pd.format)
+
addPartRequest(self.handler.anaconda, request)
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])

@@ -586,6 +593,9 @@ class Raid(commands.raid.F7_Raid):
if rd.fsopts != "":
request.fsopts = rd.fsopts

+ if rd.encrypted:
+ request.encryption = cryptodev.LUKSDevice(passphrase=rd.passphrase, format=rd.format)
+
addPartRequest(self.handler.anaconda, request)
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 08:24 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.