[master/f22-branch][PATCH] Try using the global LUKS passphrase if none is given for LV/part (#1196112)

Vratislav Podzimek vpodzime at redhat.com
Thu Mar 5 18:58:50 UTC 2015


On Thu, 2015-03-05 at 09:39 -0500, Chris Lumens wrote:
> > diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> > index 832810f..5385d35 100644
> > --- a/pyanaconda/kickstart.py
> > +++ b/pyanaconda/kickstart.py
> > @@ -1019,6 +1019,15 @@ class LogVolData(commands.logvol.F21_LogVolData):
> >              if self.passphrase and not storage.encryptionPassphrase:
> >                  storage.encryptionPassphrase = self.passphrase
> >  
> > +            # try to use the global passphrase if available
> > +            # XXX: we require the LV/part with --passphrase to be processed
> > +            # before this one to setup the storage.encryptionPassphrase
> > +            self.passphrase = self.passphrase or storage.encryptionPassphrase
> > +
> > +            if not self.passphrase:
> > +                raise KickstartValueError(formatErrorMsg(self.lineno,
> > +                                                         msg="No passphrase given for encrypted LV"))
> > +
> >              cert = getEscrowCertificate(storage.escrowCertificates, self.escrowcert)
> >              if self.preexist:
> >                  luksformat = fmt
> 
> If these error messages are intended to be something the user can read
> and take action on, they should be translatable.  If they're more for
> our benefit, this is fine as-is.
Good catch, they should be translatable, I think. Fixing locally.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list