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

# This abstraction gives read access on all defined user directories. It should
# only be used if access to **ALL** folders is required.

  abi <abi/4.0>,

  owner @{HOME}/ r,
  owner @{MOUNTS}/ r,

  owner @{HOME}/@{XDG_DESKTOP_DIR}/{,**} rk,
  owner @{HOME}/@{XDG_SCREENSHOTS_DIR}/{,**} rk,
  owner @{HOME}/@{XDG_WALLPAPERS_DIR}/{,**} rk,
  owner @{MOUNTS}/@{XDG_DESKTOP_DIR}/{,**} rk,
  owner @{MOUNTS}/@{XDG_SCREENSHOTS_DIR}/{,**} rk,
  owner @{MOUNTS}/@{XDG_WALLPAPERS_DIR}/{,**} rk,

  owner @{user_books_dirs}/{,**} rk,
  owner @{user_documents_dirs}/{,**} rk,
  owner @{user_download_dirs}/{,**} rk,
  owner @{user_games_dirs}/{,**} rk,
  owner @{user_music_dirs}/{,**} rk,
  owner @{user_pictures_dirs}/{,**} rk,
  owner @{user_projects_dirs}/{,**} rk,
  owner @{user_publicshare_dirs}/{,**} rk,
  owner @{user_sync_dirs}/{,**} rk,
  owner @{user_templates_dirs}/{,**} rk,
  owner @{user_torrents_dirs}/{,**} rk,
  owner @{user_videos_dirs}/{,**} rk,
  owner @{user_vm_dirs}/{,**} rk,
  owner @{user_work_dirs}/{,**} rk,

  include if exists <abstractions/user-read-strict.d>

# vim:syntax=apparmor
