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

abi <abi/3.0>,

include <tunables/global>

@{name} = thunderbird{,-bin}
@{lib_dirs} = @{lib}/@{name}
@{config_dirs} = @{HOME}/.@{name}/
@{cache_dirs} = @{user_cache_dirs}/@{name}/

@{exec_path} = @{lib_dirs}/vaapitest
profile thunderbird-vaapitest @{exec_path} {
  include <abstractions/base>
  include <abstractions/graphics>

  network netlink raw,

  @{exec_path} mr,

  owner @{tmp}/thunderbird/.parentlock rw,

  deny @{cache_dirs}/*/startupCache/** r,
  deny @{config_dirs}/*/.parentlock rw,
  deny @{config_dirs}/*/startupCache/** r,

  include if exists <local/thunderbird-vaapitest>
}

# vim:syntax=apparmor
