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

abi <abi/4.0>,

include <tunables/global>

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

@{exec_path} = @{lib_dirs}/gfxtest
@{att} = /att/thunderbird-gfxtest/
profile thunderbird-gfxtest /{,usr/}lib{,exec,32,64}/thunderbird{,-bin}/gfxtest flags=(attach_disconnected,attach_disconnected.path=@{att}) {
  include <abstractions/attached/base>
  include <abstractions/graphics>

  network netlink raw,

  @{exec_path} mr,

  / r,

  owner @{config_dirs}/*/.parentlock rw,

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

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

  include if exists <local/thunderbird-gfxtest>
}

# vim:syntax=apparmor
