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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{lib}/vlc/vlc-cache-gen
@{att} = ""
profile vlc-cache-gen /{,usr/}lib{,exec,32,64}/vlc/vlc-cache-gen flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/consoles>

  @{exec_path} mr,

  @{lib}/vlc/plugins/{,*} rw,

  @{sys}/devices/system/node/ r,
  @{sys}/devices/system/node/node@{int}/meminfo r,

  # Inherit silencer
  deny network inet6 stream,
  deny network inet stream,

  include if exists <local/vlc-cache-gen>
}

# vim:syntax=apparmor
