QtSystemInfo fails when using ofono and there are DBus denials to ofono
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qtsystems-opensource-src (Ubuntu) |
Won't Fix
|
High
|
Unassigned | ||
Saucy |
Won't Fix
|
High
|
Unassigned | ||
Trusty |
Won't Fix
|
High
|
Unassigned |
Bug Description
= Background =
Applications in the Ubuntu appstore are packaged as click packages and run under confinement. Applications sometimes need to know if they are connected to the internet, on an expensive connection or disconnected. QtSystemInfo:
Attached is a simple QML application to test this and an apparmor profile. Save the qml file as /tmp/test-
In one terminal, run:
$ tail -f /var/log/syslog | grep DEN
In another, run:
$ sudo apparmor_parser -r /tmp/profile && aa-exec -p test-network -- qmlscene /tmp/test-
On a desktop system, the application should say that it is connected to the home network (or similar) and there will be no apparmor denials for NetworkManager (there will be one for GConf, but that can be ignored). On a system with a working ofono (eg, Nexus 4 with up to date Ubuntu Touch), this the application will report an error. For the error to go away, the following ofono rules must be added to the apparmor profile:
# ofono
dbus (send)
bus=system
path=/
interface=
member=
peer=
dbus (send)
bus=system
path=/ril_*
interface=
member=
peer=
dbus (receive)
bus=system
path=/ril_*
interface=
member=
peer=
Then rerun 'sudo apparmor_parser -r /tmp/profile && aa-exec -p test-network -- qmlscene /tmp/test-
On the desktop system, /proc and /sys entries are consulted to see if online, but on a system with ofono, this is not enough. Ideally we would provide a simple dbus service (I think 'uconnectd' would be a great name-- feel free to use it ;) with methods like OnlineWired, OnlineWireless and OnlineCostlyNet
Right now, apparmor policy (correctly) denies access to ofono over DBus, but applications are unable to determine if they are on the network using standard APIs. To fix this in the short term, we can adjust to use what is in /proc and /sys and not throw an error if it gets an apparmor denial.
tags: | added: application-confinement |
summary: |
- ofonot-qt causes QtSystemInfo to fail when there are DBus denials + QtSystemInfo fails when using ofono and there are DBus denials to ofono |
Changed in ofono-qt (Ubuntu Saucy): | |
assignee: | nobody → Ricardo Salveti (rsalveti) |
importance: | Undecided → High |
Changed in ofono-qt (Ubuntu Saucy): | |
assignee: | Ricardo Salveti (rsalveti) → Tiago Salem Herrmann (tiagosh) |
Changed in qtsystems-opensource-src (Ubuntu Saucy): | |
status: | Confirmed → Won't Fix |
FYI, you can see what ofon is giving up with these commands: Manager. GetModems NetworkRegistra tion.GetPropert ies
dbus-send --system --print-reply --dest=org.ofono / org.ofono.
dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.