# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 Roman Beslik <me@beroal.in.ua>
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/fileview
@{att} = ""
profile fileview /{,usr/}bin/fileview flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/consoles>

  @{exec_path} mr,

  # This program parses aMule internal data files like "server.met".
  # The paths to these files are given as arguments.
  # The following directories are those that users likely want to read.
  # However, this program is usable without the permissions below.
  owner @{HOME}/.aMule/{,**} r,
  @{user_torrents_dirs}/{,**} r,

  include if exists <local/fileview>
}

# vim:syntax=apparmor
