# 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/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/open-link-confirmation/open-link-confirmation
profile open-link-confirmation @{exec_path} {
  include <abstractions/base>

  @{exec_path} mr,

  @{sh_path}            rix,
  @{bin}/readlink       rix,
  @{bin}/torbrowser     rPx,
  @{bin}/whichbrowser   rix,
  @{bin}/xdg-mime       rPx,
  @{lib}/msgcollector/generic_gui_message rPx,
  @{lib}/msgcollector/striphtml rPx,

  /etc/open_link_confirm.d/{,**} r,

  owner @{HOME}/.xsession-errors rw,

  include if exists <local/open-link-confirmation>
}

# vim:syntax=apparmor
