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

# Minimal set of rules for XDG utilities like xdg-mime, xdg-settings, etc.

  abi <abi/4.0>,

  include <abstractions/consoles>
  include <abstractions/desktop-files>


  priority=-1 @{sh_path}  mrix,

  @{bin}/{,e}grep  rix,
  @{bin}/{m,g,}awk rix,
  @{bin}/basename  rix,
  @{bin}/cat       rix,
  @{bin}/cut       rix,
  @{bin}/cut       rix,
  @{bin}/env       rix,
  @{bin}/file      rix,
  @{bin}/head      rix,
  @{bin}/mkdir     rix,
  @{bin}/mktemp    rix,
  @{bin}/mv        rix,
  @{bin}/readlink  rix,
  @{bin}/realpath  rix,
  @{bin}/rm        rix,
  @{bin}/sed       rix,
  @{bin}/sleep     rix,
  @{bin}/sort      rix,
  @{bin}/touch     rix,
  @{bin}/tr        rix,
  @{bin}/tr        rix,
  @{bin}/umask     rix,
  @{bin}/uname     rix,
  @{bin}/wc        rix,

  # To set/get DE information
  @{bin}/gconftool{,-2}       ix,
  @{bin}/gio                  ix,
  @{bin}/gnomevfs-info        ix,
  @{bin}/gvfs-info            ix,
  @{bin}/kde{,4}-config       ix,
  @{bin}/kfile                ix,
  @{bin}/kmimetypefinder{,5}  ix,
  @{bin}/ktraderclient{,5}    ix,
  @{bin}/kwriteconfig{,5,6}   ix,
  @{bin}/qtpaths              ix,
  @{bin}/qtxdg-mat            ix,

  / r,

  @{PROC}/version r,

  include if exists <abstractions/common/xdg.d>

# vim:syntax=apparmor
