Review Request 111093: PolKit Actions KCM: do not crash if policies could not be read

Jaime Torres Amate jtamate at gmail.com
Sun Sep 22 09:00:12 BST 2013



> On Sept. 21, 2013, 6:40 p.m., Jaime Torres Amate wrote:
> > I've tried to apply it to today master head and it does not apply clean. Some previous patch has done something similar to your patch. (sorry, not much time to check it all).
> 
> Jonathan Marten wrote:
>     Is the definitive source base and master branch the one at git://anongit.kde.org/polkit-kde-kcmodules-1?  Just tried updating to the latest from there and the diff produced is identical.
>     
>

yes, the last commit is 6fe05fe98a3f33d72b66c4a55200e6c88e050168.
Ops, I'm sorry. I still had your previous patch for the bug applied (3 months without time for KDE things).

I've tried again, now applied right. And it works very nicely without crashes.
You have my ship it!.


- Jaime Torres


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111093/#review40425
-----------------------------------------------------------


On Sept. 18, 2013, 8:37 a.m., Jonathan Marten wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111093/
> -----------------------------------------------------------
> 
> (Updated Sept. 18, 2013, 8:37 a.m.)
> 
> 
> Review request for kde-workspace and Polkit KDE Configuration.
> 
> 
> Description
> -------
> 
> The referenced bug describes a crash in the System Settings - System Administration - Actions Policy module.  The first time that an action is clicked on, an attempt is made to read the current system policy settings via ActionWidget::reloadPKLAs().  Internally this checks the authorisation for the org.kde.polkitkde1.readauthorizations action.  If this action is not allowed, or the authorization fails, then a DBus error is returned - but never checked.  There is then a crash (via qFatal) when an attempt is made to read from the invalid returned QDBusArgument.
> 
> Unless the user made a mistake (e.g. typing the root password incorrectly), this indicates a system configuration problem.  However, even if the fix needs to be elsewhere, systemsettings should not just crash with no indication of where the problem lies.
> 
> This change checks and reports the DBus error if one is returned.  Nothing can be done within this module if this is the case, but at least there is a diagnostic message.  The widget is left disabled, but will try the authorization again if another action is selected.
> 
> 
> This addresses bug 300050.
>     http://bugs.kde.org/show_bug.cgi?id=300050
> 
> 
> Diffs
> -----
> 
>   polkitactions/ActionWidget.h ca83bf5 
>   polkitactions/ActionWidget.cpp c5785c0 
> 
> Diff: http://git.reviewboard.kde.org/r/111093/diff/
> 
> 
> Testing
> -------
> 
> With the default policy in place for org.kde.polkit1.readauthorizations (active session = auth_admin, inactive session = no), run 'kcmshell4 kcm_polkitactions'.  Expand the tree and click on any action.  In the password dialogue, either cancel or enter an incorrect password.  Check that there is no crash and that the message box is displayed.
> 
> Click on another action, correctly enter the password and observe that there is no message and policies are displayed as expected.
> 
> 
> Thanks,
> 
> Jonathan Marten
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20130922/8b348671/attachment.htm>


More information about the kde-core-devel mailing list