Hey Guys,
I have a questions to connect to the DBus in Ubuntu Core via the snap. I create successfully more snaps where can “talk” to each other via DBus.
Now I have create a small snap where use the origin org.freedesktop.DBus interface where I will call ListNames to list the dbus well know names, and check if there exist. In devmode the snap works fine but, when I tried to install in dangerous mode and doing snap connect on the interfaces, i get from Apparmor an denied message.
In Devmode
Sep 15 13:22:37 localhost kernel: [71911.842582] audit: type=1107 audit(1505481757.303:436989): pid=1236 uid=100 auid=4294967295 ses=4294967295 msg='apparmor=“ALLOWED” operation=“dbus_method_call” bus=“system” path=“/org/freedesktop/DBus” interface=“org.freedesktop.DBus” member=“ListNames” mask=“send” name=“org.freedesktop.DBus” pid=13471 label=“snap.modulemanager” peer_label=“unconfined”
In Dangerous Mode
Sep 15 13:06:13 localhost kernel: [70927.548507] audit: type=1107 audit(1505480773.010:436945): pid=1236 uid=100 auid=4294967295 ses=4294967295 msg='apparmor=“DENIED” operation=“dbus_method_call” bus=“system” path=“/org/freedesktop/DBus” interface=“org.freedesktop.DBus” member=“ListNames” mask=“send” name=“org.freedesktop.DBus” pid=12948 label=“snap.modulemanager” peer_label=“unconfined”
Yaml cut:
plugs:
pdbus:
interface: dbus
name: org.freedesktop.DBus
bus: system
pmodulemanager:
interface: dbus
name: com.modulemanager
bus: system
slots:
sdbus:
interface: dbus
name: org.freedesktop.DBus
bus: system
smodulemanager:
interface: dbus
name: com.modulemanager
bus: system
how do I need to connect that , so that I can use the ListNames function from DBus Interface in dangerous mode?
Also the slots and plus are connected in each cross way…
Greets TK