Bug 479955 - Elevating privileges doesn't work
Summary: Elevating privileges doesn't work
Status: RESOLVED FIXED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.248.0
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords: qt6
: 480156 480613 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-01-17 18:12 UTC by Antonio Rojas
Modified: 2024-01-31 18:58 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2024-01-17 18:12:56 UTC
Elevating privileges for saving root-owned files doesn't work in 6.0 RC1

STEPS TO REPRODUCE
1.  Open a root-owned file with kate
2. Modify it and try to save it

OBSERVED RESULT
Authentication dialog pops up, and when the password is entered it gives an error:
"The document could not be saved, as it was not possible to write to [...]"

Journal output:
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: COMPLETED
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Completed:  true
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Finishing obtaining privileges
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Listener adapter polkit_qt_listener_initiate_authentication_finish
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: polkit_qt_listener_initiate_authentication_finish callback for  0x58fd21d12b00
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Finish obtain authorization: true
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Dialog cancelled
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Finishing obtaining privileges
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: QCoreApplication::postEvent: Unexpected null receiver
ene 17 19:03:36 archlinux-arl polkit-kde-authentication-agent-1[1384]: Finish obtain authorization: true

EXPECTED RESULT
File is saved

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux x86_64
KDE Plasma Version: 5.92.0
KDE Frameworks Version: 5.248.0
Qt Version: 6.7 beta 1

ADDITIONAL INFORMATION
Comment 1 fanzhuyifan 2024-01-18 03:20:25 UTC
Can reproduce on arch source build.
Comment 2 Antonio Rojas 2024-01-22 09:30:02 UTC
*** Bug 480156 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2024-01-25 06:38:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/661
Comment 4 fanzhuyifan 2024-01-25 17:02:30 UTC
Git commit 7c36fe9a29de7012b04a69dec884125e4fbb8418 by Yifan Zhu.
Committed on 25/01/2024 at 07:34.
Pushed by cullmann into branch 'master'.

buffer/katesecuretextbutter: conform to KAuth api

KAuth requires the actions to be public slots.

M  +3    -1    src/buffer/katesecuretextbuffer_p.h

https://invent.kde.org/frameworks/ktexteditor/-/commit/7c36fe9a29de7012b04a69dec884125e4fbb8418
Comment 5 Antonio Rojas 2024-01-31 18:58:41 UTC
*** Bug 480613 has been marked as a duplicate of this bug. ***