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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/extension-manager
profile gnome-extension-manager @{exec_path} {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/gnome-strict>
  include <abstractions/graphics>
  include <abstractions/nameservice-strict>
  include <abstractions/p11-kit>
  include <abstractions/ssl_certs>

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

  @{exec_path} mr,

  @{bin}/gjs-console rix,

  @{open_path}  rPx -> child-open-help,

  /usr/share/gnome-shell/org.gnome.Shell.Extensions r,

        @{PROC}/sys/net/ipv6/conf/all/disable_ipv6 r,
  owner @{PROC}/@{pid}/cmdline r,
  owner @{PROC}/@{pid}/task/@{tid}/comm rw,

  # Silencer
  deny owner @{user_share_dirs}/gvfs-metadata/{,*} r,

  include if exists <local/gnome-extension-manager>
}

# vim:syntax=apparmor
