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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/mtr
profile mtr @{exec_path} {
  include <abstractions/base>
  include <abstractions/gtk>
  include <abstractions/fonts>
  include <abstractions/fontconfig-cache-read>
  include <abstractions/freedesktop.org>
  include <abstractions/nameservice-strict>

  network inet dgram,
  network inet6 dgram,
  network netlink raw,

  signal (send) set=(term, kill) peer=mtr-packet,

  @{exec_path} mr,

  @{bin}/mtr-packet rPx,

  include if exists <local/mtr>
}
