Commit Graph

56 Commits

Author SHA1 Message Date
Andrius Štikonas bb2de6cd56 Port away from QRegExp to QRegularExpression. 2016-05-08 00:22:22 +01:00
Andrius Štikonas 5c32921fcd Make log message more user friendly. 2016-05-07 01:11:59 +01:00
Teo Mrnjavac d584c70696 Passphrase accessor. 2016-05-06 16:50:23 +02:00
Andrius Štikonas 3ede101167 Fix a typo: mount->umount. 2016-05-06 14:34:40 +01:00
Teo Mrnjavac 6013b5887c Always use outer UUID for mapper name. 2016-05-05 14:15:57 +02:00
Andrius Štikonas 0bd44b94dc Use trimmed() instead of simplified(). 2016-05-05 12:46:27 +01:00
Andrius Štikonas a1026d20be Use KPasswordDialog to open LUKS containers. 2016-05-01 14:17:06 +01:00
Andrius Štikonas f1210d0aa7 Pass LUKS payload length to cryptsetup --size.
Before we were passing the length of the whole LUKS partition. After shrinking
LUKS partitions blkid would not recognize them.
2016-04-30 13:48:09 +01:00
Andrius Štikonas a115961f04 Calculate the size of innerFS when growing LUKS volumes. 2016-04-29 20:25:14 +01:00
Andrius Štikonas 314742f40a Use long options for cryptstup. 2016-04-29 19:49:06 +01:00
Andrius Štikonas 4ff7ada40b Fix size vs sector number when resizing LUKS. 2016-04-29 18:12:34 +01:00
Andrius Štikonas 7cd1fd6eb7 Initial LUKS shrink support. 2016-04-29 17:56:39 +01:00
Andrius Štikonas 91c36c3d20 Adjust minCapacity for btrfs and luks. After all, it seems 40 MiB doesn't work. 2016-04-29 17:09:41 +01:00
Andrius Štikonas 47a1594705 Slightly improve setting used sectors. 2016-04-29 15:33:26 +01:00
Andrius Štikonas e2f21360bb Add support for reading used capacity of innerFS.
Also make sure labels, used capacity and UUID are properly updated when
opening or closing luks volumes."
2016-04-29 14:27:01 +01:00
Andrius Štikonas 85aca763a2 Pass a pointer to the parent widget to decrypt dialog. 2016-04-29 12:36:24 +01:00
Andrius Štikonas 4df97ec3e7 Fix detection of closed luks volumes (broken by new mapperName function). 2016-04-28 23:25:01 +01:00
Andrius Štikonas aa02ae7b1c When cryptsetup is missing complain about it, not support tools of innerFS. 2016-04-28 22:47:58 +01:00
Andrius Štikonas 6b772f3332 Optimize luks::mapperName function.
Now it uses lsblk to find out mapper node.
It also makes opened luks volumes to be properly detected when no cryptsetup
is found, e.g. crypt is opened in initramfs.
2016-04-28 22:38:38 +01:00
Andrius Štikonas 25e28a0e16 Only enable deactivation of LUKS volume if cryptsetup is found. 2016-04-28 21:56:03 +01:00
Andrius Štikonas ea4b945ebb Add override keyword to virtual functions. 2016-04-27 21:54:02 +01:00
Andrius Štikonas e96c13b2bb Disable opening crypt if cryptsetup is not found. 2016-04-27 14:29:48 +01:00
Andrius Štikonas 51ef8013b1 Fix luks supportToolFound logic. 2016-04-27 14:22:00 +01:00
Andrius Štikonas 6bcbe14169 Add support for detecting support tools of innerFS. 2016-04-27 13:52:23 +01:00
Andrius Štikonas e3bb8a335c Return error if creating innerFS fails. 2016-04-27 00:50:51 +01:00
Andrius Štikonas 9c31d45229 Slightly reorder functions in luks.cpp to match other filesystems. 2016-04-27 00:29:01 +01:00
Andrius Štikonas 1ee315303c Do not use QStringLiteral for empty strings. 2016-04-26 13:53:25 +01:00
Andrius Štikonas dff128264c Revert "Optimize QString->QStringLiteral."
This reverts commit df33b21b0d.
2016-04-26 13:50:44 +01:00
Andrius Štikonas df33b21b0d Optimize QString->QStringLiteral. 2016-04-26 13:46:02 +01:00
Andrius Štikonas d87ac7dc20 Add support for checking innerFS. 2016-04-26 13:26:40 +01:00
Andrius Štikonas 12c03cfeff Clear LUKS label when closing crypt. 2016-04-24 21:51:49 +01:00
Andrius Štikonas 96ceadd3be Use open/close instead of luksOpen/luksClose. 2016-04-22 16:24:30 +01:00
Teo Mrnjavac 8e3e9309ed suggestedMapperName as a separate method. 2016-04-22 16:48:45 +02:00
Andrius Štikonas 2e7055aa69 Merge branch 'master' into luks-decorator 2016-04-21 23:03:28 +01:00
Andrius Štikonas 33c049926f
Add initial support for reading and writing innerFS labels. 2016-04-21 21:19:49 +01:00
Teo Mrnjavac 27d5ff82e6 Cache the passphrase in a LUKS open session. 2016-04-21 18:36:04 +02:00
Andrius Štikonas d126f04886
Add initial support for growing LUKS volumes.
Added support for filling btrfs, ext and swap partitions.
2016-04-21 17:22:48 +01:00
Teo Mrnjavac 7edc601a36 Allow the UI to set a passphrase before creation instead of asking. 2016-04-21 17:05:27 +02:00
Andrius Štikonas 46c3536a4c
Use UUID of LUKS partition for mapper name. 2016-04-19 17:10:59 +01:00
Teo Mrnjavac b4a57db54d Update copyright and strings. 2016-04-15 15:43:21 +02:00
Teo Mrnjavac e1383df143 Assume the inner FS is already set when creating LUKS FS.
An open LUKS FS now reports the type of its inner FS.
Build a list of "LUKS-encryptable" filesystem types.
2016-04-15 15:33:32 +02:00
Teo Mrnjavac 9970fb7b1d Make sure to create the inner fs when detecting. 2016-04-13 18:32:21 +02:00
Teo Mrnjavac 7993257541 Inner fs mount checks must use mapper name. 2016-04-13 17:01:53 +02:00
Teo Mrnjavac 3f10c8e2d5 We don't need the dash because ExternalCommand already does the piping. 2016-04-13 15:56:07 +02:00
Teo Mrnjavac c41f843aff Actually create inner fs. 2016-04-13 15:55:35 +02:00
Teo Mrnjavac 1b79099760 Preliminary LUKS create support. 2016-04-12 11:26:07 +02:00
Teo Mrnjavac 1aff54c047 Use C++11 initialization instead of << for readability. 2016-04-07 16:13:29 +02:00
Teo Mrnjavac 45311941ca Add mounted state accessors to FS::luks. 2016-04-06 18:13:18 +02:00
Teo Mrnjavac 0a8a5887df Bring back LUKS code which was previously merged+reverted.
Revert "Revert merge of branch luks-decorator."
This reverts commit efd3179d95.
Messages:
FS::luks is now a decorator for an actual FS composed inside.
Implement cryptOpen/cryptClose/mount/unmount operations.
detectFileSystem, which only uses blkid, is now in FileSystem.cpp.
FileSystem::mount now requires a mountPoint.
Use umount -A to immediately umount all mount points in unmountCmds.
Add override keywords, TODO: add them everywhere.
LibPartedBackend no longer links against libblkid.
Fix LUKS handling in LibPartedBackend::scanDevicePartitions.
Allow detecting FS::Type by path, and remove libparted workaround.
FS detection now only uses blkid (from util-linux).
2016-03-31 18:43:38 +02:00
Andrius Štikonas efd3179d95 Revert merge of branch luks-decorator. 2015-09-16 14:18:13 +01:00