QSysInfo doesn't work properly with AppArmor confinement

Bug #1607217 reported by Tamas Miklos
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
New
Undecided
Unassigned
qtsystems-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

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.

Tags: qsysinfo
Revision history for this message
Tamas Miklos (aida64-app-developer) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in qtsystems-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.