diff options
author | David Lehman <dlehman@redhat.com> | 2008-10-27 13:45:38 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2008-10-27 13:46:06 -0500 |
commit | 9c55aab9d9a4168feac82bab3dbb04b7ab90e9bd (patch) | |
tree | bef21db796ae346c732a2f883adb1c53237faf1a /partitions.py | |
parent | 1fbec6206ec839e419c37c6963a83710cb6925b4 (diff) | |
download | anaconda-9c55aab9d9a4168feac82bab3dbb04b7ab90e9bd.tar.gz anaconda-9c55aab9d9a4168feac82bab3dbb04b7ab90e9bd.tar.xz anaconda-9c55aab9d9a4168feac82bab3dbb04b7ab90e9bd.zip |
Don't treat encrypted PVs as available if we don't have the key. (#465240)
This arises from the fact that we determine whether or not a device
is a PV by looking at the partition type instead of probing the
device's contents like with other filesystems/ptypes. So, if we have
a PV that the user chose not to provide a passphrase for, we should
not include it in the list of available PVs.
Diffstat (limited to 'partitions.py')
-rw-r--r-- | partitions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/partitions.py b/partitions.py index efdfd9fb8..b6794fae1 100644 --- a/partitions.py +++ b/partitions.py @@ -417,6 +417,8 @@ class Partitions: ptype = fsset.fileSystemTypeGet(fsname) except: ptype = fsset.fileSystemTypeGet("foreign") + elif cryptodev.isLuks("/dev/%s" % device): + ptype = fsset.fileSystemTypeGet("foreign") start = part.geom.start end = part.geom.end @@ -902,6 +904,10 @@ class Partitions: for part in partedUtils.get_lvm_partitions(disk): partname = partedUtils.get_partition_name(part) partrequest = self.getRequestByDeviceName(partname) + if partrequest.encryption is None and cryptodev.isLuks("/dev/%s" % partname): + # we don't want to treat encrypted an PV like a PV if the + # user chose not to provide a passphrase for this device + continue used = 0 for volgroup in volgroups: if volgroup.physicalVolumes: |