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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/thunar-volman
@{att} = /att/thunar-volman/
profile thunar-volman /{,usr/}bin/thunar-volman flags=(attach_disconnected,attach_disconnected.path=@{att}) {
  include <abstractions/attached/base>
  include <abstractions/bus-session>
  include <abstractions/dconf>
  include <abstractions/devices-usb-read>
  include <abstractions/disks-read>
  include <abstractions/attached/nameservice-strict>
  include <abstractions/sys/input>
  include <abstractions/udev/input>
  include <abstractions/xfce>

  network netlink raw,

  @{exec_path} mr,

  /etc/fstab r,

  / r,

  owner @{PROC}/@{pid}/mountinfo r,

  include if exists <local/thunar-volman>
}

# vim:syntax=apparmor
