[KIO] Remove PrivilegeExecution job flag
ClosedPublic

Authored by chinmoyr on Feb 1 2018, 3:56 PM.

Details

Summary

Same as title.

Test Plan

Unfortunately, it seems no one beside me (and few others?) has tested privilege execution feature yet.
In this situation it's unclear which flag is more suitable. So I am removing PrivilegeExecution flag
based on the tests I have done on my local setup and little bit of instinct.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
chinmoyr created this revision.Feb 1 2018, 3:56 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 1 2018, 3:56 PM
chinmoyr requested review of this revision.Feb 1 2018, 3:56 PM
ngraham added a subscriber: ngraham.Feb 1 2018, 5:41 PM
dfaure accepted this revision.Feb 2 2018, 11:56 PM

Thanks for remembering to clean this up in time.

Indeed not many people tested it, since it's still disabled...

I tried to revert 5a1ea84476, restart kdeinit5 and kill kio_file instances, and copying a file to '/' indeed offers to do it as root, but then fails (no password prompt is shown). Either it's broken or I'm not testing it right (I'm installing everything into a custom prefix, so I copied the polkit file to /usr/share/polkit-1/actions/org.kde.kio.file.policy but maybe there are other files I need to copy?)

This revision is now accepted and ready to land.Feb 2 2018, 11:56 PM
This revision was automatically updated to reflect the committed changes.

Try copying org.kde.kio.file.conf and .service file to dbus-1 directory. It worked for me.

On a completely different note, do all jobs have a uidelgate or does passing HideProgressInfo flag prevent it from being created?

dfaure added a comment.Feb 3 2018, 9:37 AM

Try copying org.kde.kio.file.conf and .service file to dbus-1 directory. It worked for me.

Ah, systemd stuff, not dbus stuff (which finds files in my custom prefix). Thanks, that worked, I was able to copy a file to '/'.
The context menu for that file crashes kded5 (kdesvnd), I'm debugging that now...

On a completely different note, do all jobs have a uidelgate or does passing HideProgressInfo flag prevent it from being created?

Neither ;)
Some jobs don't have a uidelegate, those where we call setUiDelegate(0) (as is often done in unittests, to prevent any interaction with the user, like "file exists, do you want to overwrite or skip").
HideProgressInfo doesn't remove such interaction, so the delegate still exists when setting HideProgressInfo.