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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/firewall-applet
profile firewall-applet @{exec_path} flags=(attach_disconnected) {
  include <abstractions/base>
  include <abstractions/consoles>
  include <abstractions/dconf-write>
  include <abstractions/desktop>
  include <abstractions/python>

  @{exec_path} mr,

  @{bin}/ r,
  @{bin}/python3.@{int} r,

  owner @{PROC}/@{pid}/cmdline r,
  owner @{PROC}/@{pid}/mounts r,

  include if exists <local/firewall-applet>
}

# vim:syntax=apparmor
