I’m trying to packaging Extension Manager as a snap. Everything else works fine, but the dbus call is denied by apparmor when I turned the snap to strict mode. My source code is at https://github.com/dingdang66686/extension-manager. And the log output of snappy-debug is at here:
= AppArmor =
Time: Jan 22 20:36:44
Log: apparmor="DENIED" operation="capable" profile="/snap/snapd/17950/usr/lib/snapd/snap-confine" pid=152579 comm="snap-confine" capability=12 capname="net_admin"
Capability: net_admin
Suggestions:
* adjust program to not require 'CAP_NET_ADMIN' (see 'man 7 capabilities')
* add one of 'bluetooth-control, firewall-control, netlink-audit, netlink-connector, network-control, qualcomm-ipc-router' to 'plugs'
* do nothing if using systemd utility (eg, timedatectl): https://forum.snapcraft.io/t/managing-time-date-and-timezone-in-ubuntu-core/408/44
* do nothing (https://launchpad.net/bugs/1465724)
= AppArmor =
Time: Jan 22 20:36:44
Log: apparmor="DENIED" operation="capable" profile="/snap/snapd/17950/usr/lib/snapd/snap-confine" pid=152579 comm="snap-confine" capability=38 capname="perfmon"
Capability: perfmon
Suggestions:
* adjust program to not require 'CAP_PERFMON' (see 'man 7 capabilities')
* do nothing if program otherwise works properly
= Seccomp =
Time: Jan 22 20:36:44
Log: auid=1000 uid=1000 gid=1000 ses=3 subj=snap.gnome-extension-manager.gnome-extension-manager pid=152657 comm="extension-manag" exe="/snap/gnome-extension-manager/x11/usr/bin/extension-manager" sig=0 arch=c000003e 314(sched_setattr) compat=0 ip=0x7f2579889a3d code=0x50000
Syscall: sched_setattr
Suggestion:
* add 'process-control' to 'plugs'
= AppArmor =
Time: Jan 22 20:36:45
Log: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/Shell/Extensions" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.364" pid=152657 label="snap.gnome-extension-manager.gnome-extension-manager" peer_pid=152692 peer_label="unconfined"
DBus access
= AppArmor =
Time: Jan 22 20:36:45
Log: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/Shell/Extensions" interface="org.gnome.Shell.Extensions" member="ListExtensions" mask="send" name=":1.364" pid=152657 label="snap.gnome-extension-manager.gnome-extension-manager" peer_pid=152692 peer_label="unconfined"
DBus access
= AppArmor =
Time: Jan 22 20:36:45
Log: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/gnome/Shell/Extensions" interface="org.gnome.Shell.Extensions" member="CheckForUpdates" mask="send" name=":1.364" pid=152657 label="snap.gnome-extension-manager.gnome-extension-manager" peer_pid=152692 peer_label="unconfined"
DBus access
= Seccomp =
Time: Jan 22 20:36:45
Log: auid=1000 uid=1000 gid=1000 ses=3 subj=snap.gnome-extension-manager.gnome-extension-manager pid=152657 comm="extension-manag" exe="/snap/gnome-extension-manager/x11/usr/bin/extension-manager" sig=0 arch=c000003e 203(sched_setaffinity) compat=0 ip=0x7f25798065b1 code=0x50000
Syscall: sched_setaffinity
Suggestion:
* add 'process-control' to 'plugs'