diff options
author | David Lehman <dlehman@redhat.com> | 2007-11-16 15:45:49 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2007-11-16 15:51:13 -0600 |
commit | a790f7407b82c7b5a703b42ed0e7d7dd2245947d (patch) | |
tree | 97a6d25f4ca581165388d7cc4b06c6701c5829a2 /iw/partition_ui_helpers_gui.py | |
parent | 109094c4acfe25c569bc49f8b3efad3b6c08fb35 (diff) | |
download | anaconda-a790f7407b82c7b5a703b42ed0e7d7dd2245947d.tar.gz anaconda-a790f7407b82c7b5a703b42ed0e7d7dd2245947d.tar.xz anaconda-a790f7407b82c7b5a703b42ed0e7d7dd2245947d.zip |
Initial support for block devices encrypted using LUKS/dm-crypt.
The class LUKSDevice, in cryptodev.py, handles the details of creation and management of the encrypted devices. RequestSpec and Device classes contain an optional LUKSDevice instance describing the device's encryption setup.
There is no support for pre-existing encrypted devices and kickstart support is not present at this point.
Diffstat (limited to 'iw/partition_ui_helpers_gui.py')
-rw-r--r-- | iw/partition_ui_helpers_gui.py | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index be66780bf..5fa5f25bd 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -207,8 +207,15 @@ def mountptchangeCB(widget, fstypecombo): fstypecombo.set_active_text("vfat") def formatOptionCB(widget, data): - (combowidget, mntptcombo, ofstype) = data + (combowidget, mntptcombo, ofstype, lukscb) = data combowidget.set_sensitive(widget.get_active()) + if lukscb is not None: + lukscb.set_data("formatstate", widget.get_active()) + if not widget.get_active(): + lukscb.set_active(0) + lukscb.set_sensitive(0) + else: + lukscb.set_sensitive(1) # inject event for fstype menu if widget.get_active(): @@ -239,6 +246,7 @@ def noformatCB(widget, data): migraterb - radiobutton for migrate fs migfstype - menu for migrate fs types migfstypeMenu - menu for migrate fs types + lukscb - checkbutton for 'encrypt using LUKS/dm-crypt' """ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, ignorefs=[]): @@ -277,8 +285,11 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, if not formatrb.get_active() and not origrequest.migrate: mountCombo.set_data("prevmountable", ofstype.isMountable()) + # this gets added to the table a bit later on + lukscb = gtk.CheckButton(_("Encrypt Partition")) + formatrb.connect("toggled", formatOptionCB, - (fstypeCombo, mountCombo, ofstype)) + (fstypeCombo, mountCombo, ofstype, lukscb)) noformatrb.connect("toggled", noformatCB, (fstypeCombo, mountCombo, origrequest.origfstype)) @@ -300,16 +311,25 @@ def createPreExistFSOptionSection(origrequest, maintable, row, mountCombo, row = row + 1 migraterb.connect("toggled", formatOptionCB, - (migfstypeCombo, mountCombo, ofstype)) + (migfstypeCombo, mountCombo, ofstype, None)) else: migraterb = None migfstypeCombo = None row = row + 1 + if origrequest.encryption and formatrb.get_active(): + # probably never happen + lukscb.set_active(1) + + lukscb.set_sensitive(formatrb.get_active()) + lukscb.set_data("formatstate", formatrb.get_active()) + maintable.attach(lukscb, 0, 2, row, row + 1) + row = row + 1 + rc = {} for var in ['noformatrb', 'formatrb', 'fstypeCombo', - 'migraterb', 'migfstypeCombo']: + 'migraterb', 'migfstypeCombo', 'lukscb']: if eval("%s" % (var,)) is not None: rc[var] = eval("%s" % (var,)) |