# apparmor.d - Full set of apparmor profiles
# 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}/gnome-extensions-app
profile gnome-extensions-app @{exec_path} {
  include <abstractions/base>
  include <abstractions/common/gnome>
  include <abstractions/nameservice-strict>

  @{exec_path} mr,

  @{sh_path}         rix,
  @{bin}/gjs-console rix,

  /usr/share/gnome-shell/org.gnome.Extensions* r,
  /usr/share/icu/@{int}.@{int}/*.dat r,
  /usr/share/terminfo/** r,

  owner @{PROC}/@{pid}/mounts r,
  owner @{PROC}/@{pids}/stat r,
  owner @{PROC}/@{pids}/task/@{tid}/stat r,

  /dev/tty rw,

  include if exists <local/gnome-extensions-app>
}

# vim:syntax=apparmor
