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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/thunar-volman
profile thunar-volman @{exec_path} {
  include <abstractions/base>
  include <abstractions/nameservice-strict>
  include <abstractions/xfce>

  network netlink raw,

  @{exec_path} mr,

  /etc/fstab r,

  @{sys}/devices/virtual/input/input@{int}/{,**/}uevent r,

  @{run}/udev/data/+input:input@{int} r,  # for mouse, keyboard, touchpad
  @{run}/udev/data/c13:@{int}  r,         # for /dev/input/*

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

  include if exists <local/thunar-volman>
}

# vim:syntax=apparmor
