Summary: | crash when modifying PolicyKit actions | ||
---|---|---|---|
Product: | [Plasma] policykit-kde-agent-1 | Reporter: | Jaime Torres <jtamate> |
Component: | kcm_auth | Assignee: | Dario Freddi <drf> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | afiestas, cfeck, dantti12, jjm |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/polkit-kde-kcmodules-1/9ad726f709161853932a89205f3f1e0f3f7291ce | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Debugging patch |
Description
Jaime Torres
2012-05-15 10:11:49 UTC
*** Bug 312252 has been marked as a duplicate of this bug. *** Same message and backtrace in bug 312252, for versions: Application: systemsettings (1.0) KDE Platform Version: 4.9.95 (Compiled from sources) Qt Version: 4.8.5 Operating System: Linux 3.7.0-7-generic x86_64 Distribution: Ubuntu 12.10 Confirmed with current trunk. Upon investigation, this happens if the user is not authorised by PolicyKit to perform the action org.kde.polkitkde1.readauthorizations which is used internally by PolkitKde1Helper::retrievePolicies(), in turn used by PolkitKde::ActionWidget::reloadPKLAs(). DBus returns an error in this case, but no check is made. @reporters: can you check the output of the command: pkcheck -u -p $$ -a org.kde.polkitkde1.readauthorizations && echo "allowed" @developers: maybe put a check for reply.isError() in ActionWidget::reloadPKLAs() and show a message box and give up if this happens. tried your command: pkcheck -u -p $$ -a org.kde.polkitkde1.readauthorizations && echo "allowed" it ask me for root password and (if introduced right) shows polkit\56retains_authorization_after_challenge=true polkit\56temporary_authorization_id=tmpauthz0 allowed the following times, just polkit\56temporary_authorization_id=tmpauthz0 allowed Thanks for the results... if my guess is correct, then if this check works then the crash should not happen. But if it still crashes, then we need a polkit expert. Created attachment 80509 [details]
Debugging patch
If you can compile from source, does applying this patch to polkit-kde-kcmodules avoid the crash? The settings may not be meaningful in this case, but it should print a debug message on stderr instead of crashing.
Yes, it avoids the crash, because it does not allows to open the policy. Simple way to reproduce... insert a pendrive, the dialog for the mount password is shown, then open systemsettings, Actions policy.. and when I press in the policy, nothing is shown. If I make a change and I want to save it, it says "org.freedesktop.DBus.Error.AccessDenied", "Saving implicit policy settings is unauthorized". In that case, nothing is shown in stderr. When the policy is opened, it displays all the available policies, like: ...... "org.kde.polkitkde1.changeexplicitauthorizations" "org.kde.polkitkde1.changeimplicitauthorizations" "org.kde.polkitkde1.changesystemconfiguration" "org.kde.polkitkde1.readauthorizations" "org.kde.powerdevil.backlighthelper.brightness" "org.kde.powerdevil.backlighthelper.setbrightness" ........ Git commit 9ad726f709161853932a89205f3f1e0f3f7291ce by Jonathan Marten. Committed on 24/09/2013 at 16:38. Pushed by marten into branch 'master'. Show a diagnostic message if reading policies fails. The settings displayed will not be meaningful in this case, but at least it avoids a fatal assert within Qt. REVIEW:111093 M +25 -4 polkitactions/ActionWidget.cpp M +1 -1 polkitactions/ActionWidget.h http://commits.kde.org/polkit-kde-kcmodules-1/9ad726f709161853932a89205f3f1e0f3f7291ce |