Bug 266807 - In plasmoid-networkmanagement root password is asked unnecessarily(?) and endlessly for mobile broadband statistics which finally cannot be displayed
Summary: In plasmoid-networkmanagement root password is asked unnecessarily(?) and end...
Status: RESOLVED FIXED
Alias: None
Product: Network Management
Classification: Unclassified
Component: Mobile Broadband (show other bugs)
Version: 0.9
Platform: openSUSE RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Lamarque V. Souza
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 13:09 UTC by Tamás Németh
Modified: 2011-02-22 18:38 UTC (History)
1 user (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 Tamás Németh 2011-02-21 13:09:12 UTC
Version:           0.9 (using KDE 4.6.0) 
OS:                Linux

When using plasmoid-networkmanagement one can get connection statistics for wired ethernet and wireless wifi connections, but when asking for mobile broadband statistics, the plasmoid asks for the root password. I don't know why is it necessary when the ethernet and wifi statistics can be displayed without the root password. Moreover, when i type in the root password, it asks for in again and again endlessly until choosing cancel. Upon pressing cancel it finally displays the statistics page but it cannot collect statistics from the connection.

Reproducible: Always

Steps to Reproduce:
1. Connect to a mobile broadband network.
2. Try to collect its connection statistics.



VPN connection statistics doesn't work either, but that doesn't ask for the root password at least.
Comment 1 Lamarque V. Souza 2011-02-22 15:33:55 UTC
ModemManager protects part of its dbus interface through policy kit. When someone tries to make a dbus call to one of the methods in that interface policy kit will ask for root password. You can configure policy kit to let you access the API without password.

In my notebook I added the file /etc/polkit-1/localauthority/50-local.d/10-org.notebook.pkla:

[Normal Staff Permissions]
Identity=unix-group:wheel
Action=org.freedesktop.ModemManager.*
ResultAny=auth_admin
ResultInactive=auth_admin
ResultActive=yes

Anybody in the wheel group will get access to ModemManager's dbus interfaces. That change can also be done using KDE's policy kit configurator, which I have never used and only works in KDE SC 4.6.x. I created that file during KDE SC 4.5.x period, which did not have a policy kit configurator, so I had to use the configuration file directly.
Comment 2 Tamás Németh 2011-02-22 16:48:37 UTC
(In reply to comment #1)
> ModemManager protects part of its dbus interface through policy kit. When
> someone tries to make a dbus call to one of the methods in that interface
> policy kit will ask for root password. You can configure policy kit to let you
> access the API without password.
> 
> In my notebook I added the file
> /etc/polkit-1/localauthority/50-local.d/10-org.notebook.pkla:
> 
> [Normal Staff Permissions]
> Identity=unix-group:wheel
> Action=org.freedesktop.ModemManager.*
> ResultAny=auth_admin
> ResultInactive=auth_admin
> ResultActive=yes
> 
> Anybody in the wheel group will get access to ModemManager's dbus interfaces.
> That change can also be done using KDE's policy kit configurator, which I have
> never used and only works in KDE SC 4.6.x. I created that file during KDE SC
> 4.5.x period, which did not have a policy kit configurator, so I had to use the
> configuration file directly.

Thank you for the explanation.
Comment 3 Lamarque V. Souza 2011-02-22 18:38:12 UTC
Git commit c2d276b2e3635d0bc2f3f15ee20efd01209db01b by Lamarque V. Souza.
Committed on 22/02/2011 at 18:32.
Pushed by lvsouza into branch 'master'.

These calls are protected by policy kit. Without proper configuration
policy kit agent will ask for password, which is bothering users (BUG
266807). Plasma NM still does not use this information, so I will leave
them commented until I really need them.

BUG: 266807

M  +7    -2    applet/interfacedetailswidget.cpp     

http://commits.kde.org/networkmanagement/c2d276b2e3635d0bc2f3f15ee20efd01209db01b