FYI, IIRC this would happen on Touch but on Touch we would explicitly
deny access to network manager in the networking policy group which
suppressed the apparmor denial. Due to the way apparmor works and how
snappy builds up interfaces, we use explicit denials extremely
sparingly, which is why you may be seeing this only now.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qtdeclarative-opensource-
src in Ubuntu.
https://bugs.launchpad.net/bugs/1661743

Title:
  XmlListModel with xml string triggers AppArmor denials

Status in qtdeclarative-opensource-src package in Ubuntu:
  Confirmed

Bug description:
  XmlListModel with xml string triggers AppArmor denials, when the xml
  prop is set no network call should be made since the source is a just
  a string not a url and no source prop is set

  import QtQuick 2.4
  import Ubuntu.Components 1.3
  import Ubuntu.Components.ListItems 1.3 as ListItem

  import QtQuick.XmlListModel 2.0

  import "servers_list.js" as Servers

  MainView {
      objectName: "mainView"
      applicationName: "demo.daker"

      width: units.gu(50)
      height: units.gu(75)

      automaticOrientation: true
      implicitWidth: units.gu(90)
      implicitHeight: units.gu(71)

      ListItem.ItemSelector {
          id: srvSelector
          model: XmlListModel {
              id: srvModel
              xml: Servers.list
                  query: "/servers/server"
                  XmlRole { name: "hostname"; query: "host/string()" }
                  XmlRole { name: "port"; query: "port/string()" }
              }
              containerHeight: srvSelector.itemHeight * 4

          delegate: OptionSelectorDelegate {
              text: hostname + ":" + port;
          }
      }
  }

  # servers_list.js
  .pragma library

  
  var list = '<?xml version="1.0" encoding="utf-8"?><servers>' +
  '<server><port>80</port><host>google.com</host></server>' +
  '<server><port>80</port><host>facebook.com</host></server>' +
  '<server><port>80</port><host>twitter.com</host></server></servers>';

  AppArmor denials :

  QNetworkManagerInterface::QNetworkManagerInterface(QObject*) propsReply "An 
AppArmor policy prevents this sender from sending this message to this 
recipient; type="method_call", sender=":1.3076" (uid=32011 pid=4922 
comm="/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene demo") 
interface="org.freedesktop.DBus.Properties" member="GetAll" error 
name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" 
(uid=0 pid=1705 comm="NetworkManager ")"
  QNetworkManagerInterface::QNetworkManagerInterface(QObject*) nmReply "An 
AppArmor policy prevents this sender from sending this message to this 
recipient; type="method_call", sender=":1.3076" (uid=32011 pid=4922 
comm="/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene demo") 
interface="org.freedesktop.NetworkManager" member="GetDevices" error 
name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" 
(uid=0 pid=1705 comm="NetworkManager ")"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qtdeclarative-opensource-src/+bug/1661743/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to