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

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/gnome-text-editor
profile gnome-text-editor @{exec_path} {
  include <abstractions/base>
  include <abstractions/bus/org.freedesktop.FileManager1>
  include <abstractions/common/gnome>
  include <abstractions/enchant>
  include <abstractions/user-read-strict>
  include <abstractions/user-write-strict>

  @{exec_path} mr,

  owner @{user_share_dirs}/org.gnome.TextEditor/{,**} rw,

  owner @{PROC}/@{pid}/mountinfo r,

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

  include if exists <local/gnome-text-editor>
}

# vim:syntax=apparmor
