Skip to content

Commit

Permalink
interfaces: bluez: allow file descriptors to be shared via dbus
Browse files Browse the repository at this point in the history
The bluetooth stack implements a way to circumvent the bluez socket and
instead communicate over DBus to share a file descriptor between two
different process IDs. This apparmor rule allows such file descriptor
exchanging to be allowed.

Signed-off-by: Dilyn Corner <dilyn.corner@canonical.com>
  • Loading branch information
dilyn-corner authored and mvo5 committed Feb 6, 2023
1 parent 6014c88 commit d2a9306
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions interfaces/builtin/bluez.go
Expand Up @@ -147,6 +147,9 @@ const bluezConnectedSlotAppArmor = `
dbus (receive, send)
bus=system
peer=(label=###PLUG_SECURITY_TAGS###),
# Allow sharing file descriptors (via DBus)
unix (send,receive) type="seqpacket" addr=none peer=(addr=none label=###PLUG_SECURITY_TAGS###),
`

const bluezConnectedPlugAppArmor = `
Expand Down Expand Up @@ -186,6 +189,9 @@ dbus (receive)
# Allow access to bluetooth audio streams
network bluetooth,
# Allow use of shared (via DBus) file descriptors
unix (send, receive) type="seqpacket" addr=none peer=(addr=none label=###SLOT_SECURITY_TAGS###),
`

const bluezPermanentSlotSecComp = `
Expand Down

0 comments on commit d2a9306

Please sign in to comment.