# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2024 odomingao
# SPDX-License-Identifier: GPL-2.0-only

abi <abi/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/hyprlock
profile hyprlock @{exec_path} {
  include <abstractions/base>
  include <abstractions/authentication>
  include <abstractions/fonts>
  include <abstractions/graphics>
  include <abstractions/nameservice-strict>

  network netlink raw,

  @{exec_path} mr,

  /etc/security/faillock.conf r,
  /etc/shells r,

  owner @{HOME}/@{XDG_WALLPAPERS_DIR}/** r,
  owner @{user_pictures_dirs}/** r,

  owner @{user_config_dirs}/hypr/hyprlock.conf r,

  owner @{run}/faillock/@{user} rwk,

  owner /dev/tty@{int} rw,

  include if exists <local/hyprlock>
}

# vim:syntax=apparmor
