[rhel7-branch 1/1] Raise KickstartValueError when encryption passphrase not specified
vojtechtrefny
installerbot-noreply at redhat.com
Mon Jun 15 08:27:39 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Resolves: rhbz#1185466
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
pyanaconda/kickstart.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index d587976..516e8d1 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1016,6 +1016,11 @@ def execute(self, storage, ksdata, instClass):
if self.passphrase and not storage.encryptionPassphrase:
storage.encryptionPassphrase = self.passphrase
+ if not storage.encryptionPassphrase:
+ raise KickstartValueError(formatErrorMsg(self.lineno,
+ msg=_("Passphrase for encrypted device not specified.")))
+
+
cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
if self.preexist:
luksformat = fmt
@@ -1313,6 +1318,10 @@ def execute(self, storage, ksdata, instClass):
if self.passphrase and not storage.encryptionPassphrase:
storage.encryptionPassphrase = self.passphrase
+ if not storage.encryptionPassphrase:
+ raise KickstartValueError(formatErrorMsg(self.lineno,
+ msg=_("Passphrase for encrypted device not specified.")))
+
cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
if self.onPart:
luksformat = kwargs["fmt"]
@@ -1485,6 +1494,10 @@ def execute(self, storage, ksdata, instClass):
if self.passphrase and not storage.encryptionPassphrase:
storage.encryptionPassphrase = self.passphrase
+ if not storage.encryptionPassphrase:
+ raise KickstartValueError(formatErrorMsg(self.lineno,
+ msg=_("Passphrase for encrypted device not specified.")))
+
cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
if self.preexist:
luksformat = kwargs["fmt"]
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/5aeaf32326580c816988afeba9b9219cb39fbfb6
More information about the anaconda-patches
mailing list