bluetooth-control interface doesn't allow to read /sys/bus/usb/drivers/btusb/modules/**
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Fix Released
|
Medium
|
Jamie Strandboge |
Bug Description
A snap declaring a plug on bluetooth-control is unable to read files from /sys/bus/
$ su -l -c '/snap/
cat: /sys/bus/
$ snap interfaces
Slot Plug
:account-control -
:alsa -
:autopilot-
:bluetooth-control generic-consumer
:browser-support -
:camera -
:classic-support -
:core-support core:core-
:dcdbas-control -
:docker-support -
:firewall-control -
:framebuffer -
:fuse-support -
:hardware-observe -
:hardware-
:hardware-
:home -
:io-ports-control -
:joystick -
:kernel-
:kubernetes-support -
:log-observe -
:lxd-support -
:mount-observe -
:netlink-audit -
:netlink-connector -
:network -
:network-bind -
:network-control -
:network-observe -
:network-
:network-
:opengl -
:openvswitch-
:physical-
:physical-
:ppp -
:process-control -
:raw-usb -
:removable-media -
:shutdown -
:snapd-control -
:system-observe -
:system-trace -
:time-control -
:timeserver-control -
:timezone-control -
:tpm -
:uhid -
$ dmesg
[ ... ]
[Fri Jun 16 15:55:14 2017] audit: type=1400 audit(149762851
$ snap version
snap 2.26.4
snapd 2.26.4
series 16
kernel 4.4.0-1059-
$ snap list
Name Version Rev Developer Notes
core 16-2.26.4 2088 canonical -
dragonboard 16.04-0.18 24 canonical -
dragonboard-kernel 4.4.0-1059.63 25 canonical -
generic-consumer 1.0 x1 -
Changed in snapd: | |
status: | Triaged → In Progress |
Changed in snapd: | |
status: | Fix Committed → Fix Released |
The reason is that the "modules" subdirectory is actually a symlink to /sys/module/btusb/ - if we want to support this we can just add: builtin/ bluetooth_ control. go b/interfaces/ builtin/ bluetooth_ control. go .8e832acd4 100644 builtin/ bluetooth_ control. go builtin/ bluetooth_ control. go lConnectedPlugA ppArmor = ` bus/usb/ drivers/ btusb/ r, bus/usb/ drivers/ btusb/* * r, btusb/* * r, class/bluetooth / r, devices/ **/bluetooth/ rw, devices/ **/bluetooth/ ** rw,
"""
diff --git a/interfaces/
index eee042b1d.
--- a/interfaces/
+++ b/interfaces/
@@ -42,6 +42,8 @@ const bluetoothContro
# File accesses
/sys/
/sys/
+ /sys/module/btusb/ r,
+ /sys/module/
/sys/
/sys/
/sys/
""""
but I'm not sure if this is useful.