We need this to avoid multiple authentication requests when applying
long operations.
Otherwise, the user will have to authenticate after each job,
which can mean up to 4 password dialogs for some longer operations.
In the old code QByteArray fstabContents was actually empty.
Also, writeData function was opening file in append mode,
thus nothing was actually written.
Split writeData function into two:
* one for block devices
* another for writing fstab file
BUG: 417205
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.
this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.
BUG: 408245
Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated
other than that everything seems to work as before
Reviewers: stikonas
Differential Revision: https://phabricator.kde.org/D21559
Summary:
kauth helpers have a qcoreapplication started which auto-terminates after
10 seconds of idle time. this would be an added time out on top of our
life time management that is not necessary. to prevent this additional
delay simply quit the qapplication directly.
this makes helper termination almost instantaneous even when the dbus
client disappears due to crash or SIGINT, and largely removes the
need to call stopHelper altogether.
BUG: 408245
Test Plan:
both partitionmanager and calamares instantly quit the helper no matter how the client process gets terminated
other than that everything seems to work as before
Reviewers: stikonas
Differential Revision: https://phabricator.kde.org/D21559
Summary: QDbus already provides enough security to the calls made by the application to the helper. Hence no need to encrypt, sign the requests of the application and verify their integrity at the helper side.
Reviewers: stikonas, cjlcarvalho
Reviewed By: stikonas
Subscribers: #kde_partition_manager
Tags: #kde_partition_manager
Differential Revision: https://phabricator.kde.org/D21275
Summary: Even though constantifying these parameters won't change anything(since they are being passed by value), it is done to assure they conform to rest of the coding style
Reviewers: stikonas, cjlcarvalho, #kde_partition_manager
Reviewed By: cjlcarvalho
Subscribers: #kde_partition_manager
Tags: #kde_partition_manager
Differential Revision: https://phabricator.kde.org/D20106
Add CopyTargetByteArray. CopySourceByteArray is not implemented yet.
This is only suitable for reading small amount of data such as GPT header
or FAT boot sector location. Not meant for copying whole partition because
data has to be transfered over DBus.
Differential Revision: https://phabricator.kde.org/D16487
Summary:
the motivation here is to terminate the "server" helper when the client
disappears. dbus supports this use case natively via service registration
events which we can easily handle via QDBusServiceWatcher.
instead of repeatedly poking the client we'll simply monitor its dbus
service now. this is cheaper, less code and doesn't risk timing out
randomly.
Test Plan:
- on neon ISO build kpmcore & calamares & pm
- calamares manages to actually partition stuff
- partitionmanager also starts properly
- also the same again on the installed system.
Reviewers: stikonas, bshah
Reviewed By: bshah
Subscribers: bshah
Differential Revision: https://phabricator.kde.org/D14646