QSysInfo doesn't work properly with AppArmor confinement

Bug #1607217 reported by Tamas Miklos on 2016-07-28
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
qtsystems-opensource-src (Ubuntu)

Bug Description

Trying to detect platform (OS) name and version on Ubuntu Touch 15.04 based phones and tablets using QML. On the Ubuntu Desktop QSysInfo provides the following _correct_ values:

QSysInfo::productType(): "ubuntu"
QSysInfo::productVersion(): "16.04"
QSysInfo::prettyProductName(): "Ubuntu 16.04 LTS"

However, in a confined environment (e.g. bq Aquaris E5 HD Ubuntu Edition / 15.04 OTA-11) the following _incorrect_ values are provided by QSysInfo:

QSysInfo::productType(): "unknown"
QSysInfo::productVersion(): "unknown"
QSysInfo::prettyProductName(): "Linux 3.4.67"

I suppose it's because QSysInfo tries to (or would need to) access such files on the filesystem that are blocked by AppArmor, like /etc/os-release or such.

Ideally, QSysInfo::productVersion() should return not only "15.04" on an Ubuntu Touch device, but also the OTA release number. So it should be more like: "15.04 OTA-11". That's because "15.04" alone doesn't tell much about the actual Ubuntu Touch OS release installed on a mobile device.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtsystems-opensource-src (Ubuntu):
status: New → Confirmed
Lorn Potter (lorn-potter) wrote :

QSystemInfo has quite a few areas in the system it tries to access information from, read only. (We've tried hard to keep it read only access)

Just adding AppArmor to this to hopefully get some comment about this.

I could come up with a policy that would allow QSystemInfo to work, but it would be up to the security guys to decide whether they would allow it.

There are a few related bugs regarding wrong or missing information in QSystemInfo.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers