Andrius Štikonas
39d3592c23
Actually check if the caller is authorized.
2018-03-22 17:41:49 +01:00
Caio Carvalho
dac3372a78
- Including ExternalCommandHelper asynchronous DBus call in ExternalCommand::execute
...
- Stop helper before starting a new in CoreBackendManager::startExternalCommandHelper
- Unregister org.kde.kpmcore.helperinterface service in ExternalCommandHelper::exit
2018-03-22 02:32:59 -03:00
Andrius Štikonas
4b91f2c07e
Convert copyblocks dbus call to asynchronous call.
2018-03-21 21:51:30 +01:00
Andrius Štikonas
97d7076481
Increase DBus call timeout to 10 days.
2018-03-21 21:11:09 +01:00
Andrius Štikonas
bd54ba7c5d
Convert copyblocks code from KAuth to DBus calls to helper daemon.
2018-03-21 18:01:40 +01:00
Andrius Štikonas
ef2b61d2ec
Wait until the helper started.
...
Ideally we should not block at this stage and wait before the first command
is executed. But this is much better than nothing.
2018-03-19 16:21:57 +01:00
Andrius Štikonas
645e16bb20
WIP: add some experimental code where helper is used as daemon
...
Caveats:
* copyblocks are not converted yet, but should be similar.
* There is no signaling back to main application which tells when even loop has started, so after password is entered, you need to click F5 to rescan devices
* There are some security checks but are they sufficient
2018-03-19 11:42:49 +01:00
Huzaifa Faruqui
72da110996
Fix copyblocks exit status check
2018-02-06 22:32:26 +05:30
Andrius Štikonas
ac6dc0eb87
Remove backend readData/writeData functions.
2018-02-06 16:48:02 +00:00
Andrius Štikonas
06139c85ac
Remove unused function argument in startCopyBlocks.
2018-02-06 16:24:32 +00:00
Huzaifa Faruqui
00d47c6417
Use QFile for ExternalCommandHelper::readData.
2018-02-05 12:58:37 +00:00
Andrius Štikonas
b79f713ed8
Fix ExternalCommandHelper::writeData function.
...
QFile::open needs QIODevice::Append flag.
2018-02-05 12:46:13 +00:00
Andrius Štikonas
b35c21ed71
Fix an out of order compile warning.
...
Initialization should happen in the same order as variables are declared.
CC: huzaifafaruqui@gmail.com
2018-02-04 13:44:55 +00:00
Andrius Štikonas
f426f59799
Use QFile for writing data in ExternalCommandHelper::writeData
...
dd works much slower when writing to files, especially files on SSD.
Thanks to Huzaifa Faruqui for suggestion.
2018-02-03 15:58:36 +00:00
Andrius Štikonas
5c307c1cc7
Use toLongLong in KAuth helper.
...
Otherwise all integers simply overflow.
2018-02-02 18:33:35 +00:00
Huzaifa Faruqui
b143c139e5
Fix Report in copyBlocks
2018-01-29 16:45:21 +05:30
Andrius Štikonas
61fed73a5d
Remove some debug output.
2018-01-24 15:35:11 +00:00
Huzaifa Faruqui
e42a5c9289
Implement copyblocks function in KAuth helper.
...
Switch BackupFileSystemJob to thenew copyblocks function.
Reviewed and cleaned up by: Andrius Štikonas
2018-01-24 15:22:42 +00:00
Andrius Štikonas
d2ee0010d0
Update credits.
2018-01-12 11:32:09 +01:00
Andrius Štikonas
192305c1d5
Close write channel after writing to QProcess.
2017-12-10 17:36:39 +00:00
Andrius Štikonas
47429dd1bf
Proof of concept attempt to implement KAuth.
2017-12-10 17:36:39 +00:00
Andrius Štikonas
4bf5bb467f
Fix conversion to/from QString/QByteArray
...
BUG: 384321
2017-12-03 12:37:21 +00:00
Andrius Štikonas
9f3b2b8fd4
Use qOverload in Qt signal/slots.
2017-10-09 13:39:34 +01:00
Andrius Štikonas
80c5cb5a1f
Remove no longer used include.
2017-10-03 02:32:36 +01:00
Andrius Štikonas
40e22c94f2
Store ExternalCommand output in QByteArray.
...
This makes it possible to run dd with ExternalCommand.
2017-10-03 02:27:47 +01:00
Andrius Štikonas
37d3639bfe
Update credits.
2017-10-02 22:44:58 +01:00
Andrius Štikonas
8fd723770a
Update credits.
2017-10-02 01:40:41 +01:00
Andrius Štikonas
687e3fc7d4
Do not store more than 10M characters in ExternalCommand output.
...
BUG: 368674
2017-09-15 14:59:59 +01:00
Andrius Štikonas
0c33a7b001
Move showColumnsContextMenu function from kpmcore to partitionmanager.
2017-09-14 20:43:08 +01:00
Andrius Štikonas
34712dd2ed
Add fstab file parser.
...
Remove dependency on KMountPoint and hence KIO.
2017-09-13 18:46:33 +01:00
Andrius Štikonas
8a477e689e
Minor clang warnings++
2017-09-11 12:01:39 +01:00
Andrius Štikonas
5433294a5b
Fix more minor clang issues.
2017-09-11 00:29:30 +01:00
Andrius Štikonas
f7e5f7c7bf
Rename KPMcore include guards.
...
clang in -Weverything mode does not like double underscore.
2017-09-10 20:12:52 +01:00
Andrius Štikonas
fbf7e78efe
Update credits: Pali Rohár
2017-09-10 18:03:41 +01:00
Andrius Štikonas
2a118753ae
Allow selecting different channels in ExternalCommand output.
2017-08-31 10:13:24 +01:00
Andrius Štikonas
f8ba25fdfa
Improve used space detection to use fs utils when not mounted.
2017-01-05 17:27:17 +00:00
Teo Mrnjavac
39ec355b70
Remove obsolete headers.
2016-11-30 16:42:03 +01:00
Friedrich W. H. Kossebau
da0b939bf6
Use generic commits.kde.org for homepage instead of now outdated quickgit.kde.org
2016-11-16 18:36:51 +01:00
Andrius Štikonas
9c7db501bf
Use cached values for resizing volume groups.
2016-09-24 21:09:11 +01:00
Andrius Štikonas
07ed3d97cf
Add a template to easily access inner filesystem inside LUKS.
2016-09-22 13:15:20 +01:00
Chantara Tith
874900fe72
Move initLUKS from helpers to FS::luks.
2016-09-12 23:49:20 +07:00
Chantara Tith
bcd6156628
Reduce code duplication in handling mountPoint/mount/diskSpace.
2016-09-12 17:23:19 +07:00
Andrius Štikonas
ec05aa36da
Remove accidentally comitted debug code.
2016-09-05 12:56:12 +01:00
Andrius Štikonas
d83ec394b1
Make Filesystem::create non-const.
2016-09-05 12:10:56 +01:00
Andrius Štikonas
a598ad9fd1
Fix shown license.
2016-08-26 18:18:01 +01:00
Andrius Štikonas
c2cf7c4845
Add more KUIT string contexts.
2016-08-25 00:22:15 +01:00
Andrius Štikonas
3b9cc6b0a4
Add aboutData for KPMcore.
2016-08-25 00:14:51 +01:00
Andrius Štikonas
16a2d063e3
More work on C++11 for loops.
2016-08-15 17:20:50 +01:00
Andrius Štikonas
a10c8d3aaa
Convert to C++11 for loop where it is safe (avoid detaching Qt objects).
2016-08-15 17:20:50 +01:00
Andrius Štikonas
2a62bc4b14
Fix crashes in LVM scanner when external device is unplugged without deactivating LVM partitions.
...
This commit removes stderror channel from output of external commands.
2016-08-15 17:20:50 +01:00
Chantara Tith
aeaecad6fb
Move from regex to LVM Field options
2016-08-15 17:20:50 +01:00
Andrius Štikonas
3a2b78e143
Improve semantic markup of translations.
2016-07-17 23:41:00 +01:00
Andrius Štikonas
09711cdf1d
Whitespace fixes.
2016-06-01 21:00:31 +01:00
Andrius Štikonas
349b59574f
Q_OBJECT macro is not necessary for ExternalCommand.
2016-05-18 22:32:33 +01:00
Andrius Štikonas
45654e5e83
Convert to new syntax and slots syntax.
2016-05-18 19:54:36 +01:00
Andrius Štikonas
785aa7edf4
Avoid piping LUKS passphrase.
...
Also remove piping support from ExternalCommand.
It's unlikely that it will be useful enough. There were no more users of this
after luks open was migrated to QProcess::write.
2016-05-09 00:42:01 +01:00
Andrius Štikonas
0ec83e4e32
Merge branch 'luks-decorator'
2016-05-06 18:16:36 +01:00
Andrius Štikonas
0bd44b94dc
Use trimmed() instead of simplified().
2016-05-05 12:46:27 +01:00
Andrius Štikonas
440aa74dcf
List .cpp files for cmake instead of globbing them.
2016-05-04 22:14:38 +01:00
Andrius Štikonas
27af037bb4
Use lsblk to determine mounted status.
2016-05-04 21:51:04 +01:00
Andrius Štikonas
2e7055aa69
Merge branch 'master' into luks-decorator
2016-04-21 23:03:28 +01:00
Andrius Štikonas
58e9876307
Rename qglobal.h to QtGlobal
2016-04-18 17:14:31 +01: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
7f44e71298
Use KIO version instead.
2016-03-29 20:55:56 +03:00
Andrius Štikonas
e0c23f443b
Update copyright.
2016-03-02 19:00:31 +00:00
Andrius Štikonas
efd3179d95
Revert merge of branch luks-decorator.
2015-09-16 14:18:13 +01:00
Teo Mrnjavac
815cb3caad
Add ismounted.c and related from util-linux.
...
These are supposed to be LGPL or GPL 2 or later. The licensing is
unclear but in util-linux the relevant files are treated as LGPL.
is_mounted is wrapped in helpers.h
Compared to libparted, this has the benefit of not requiring a
PedPartition object, and it's supposed to be reliable and
cross-platform.
2015-08-18 18:22:30 +02:00
Teo Mrnjavac
1135a36b68
Useless forward-declare is useless.
2015-08-18 18:13:49 +02:00
Teo Mrnjavac
de27f840bf
Always use nullptr instead of NULL because it is type-safe.
2015-07-22 15:48:03 +02:00
Andrius Štikonas
626f560e52
Format kpmcore code using KDE style.
2015-07-13 17:16:36 +03:00
Teo Mrnjavac
3bbce2865f
Revert "Format kpmcore code using KDE style."
...
This reverts commit 21b569e499
.
2015-07-13 16:03:36 +02:00
Andrius Štikonas
21b569e499
Format kpmcore code using KDE style.
2015-07-13 17:02:13 +03:00
Teo Mrnjavac
3db017e4c1
Consistently use spaces instead of tabs in CMakeLists.txt files.
2015-07-02 15:21:46 +02:00
Andrius Štikonas
80904cded3
Move Capacity::preferredUnit to GUI.
2015-06-14 02:01:19 +01:00
Andrius Štikonas
5c04c17cb7
Move createFileSystemColor back to GUI.
2015-06-12 15:06:48 +01:00
Andrius Štikonas
1ef6fa8131
Move kpmcore library into its own repository.
2015-06-04 01:29:22 +01:00