# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/cups/backend/bluetooth
@{att} = ""
profile cups-backend-bluetooth /{,usr/}lib{,exec,32,64}/cups/backend/bluetooth  flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/bus-system>

  dbus send bus=system path=/
       interface=org.bluez.Manager
       member=DefaultAdapter
       peer=(name=org.bluez, label=bluetoothd),

  @{exec_path} mr,

  /etc/papersize r,
  /etc/paperspecs r,

  include if exists <local/cups-backend-bluetooth>
}

# vim:syntax=apparmor
