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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-recipes
profile gnome-recipes /{,usr/}{,s}bin/gnome-recipes flags=(complain) {
  include <abstractions/base>
  include <abstractions/dconf-write>
  include <abstractions/gnome-strict>
  include <abstractions/nameservice-strict>
  include <abstractions/ssl_certs>
  include <abstractions/p11-kit>

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

  @{exec_path} mr,

  @{bin}/tar rix,

  /usr/share/gnome-recipes/{,**} r,

  owner @{user_cache_dirs}/gnome-recipes/{,**} rw,
  
  include if exists <local/gnome-recipes>
}