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

abi <abi/4.0>,

include <tunables/global>

@{exec_path} = @{bin}/wl-copy
@{att} = /att/wl-copy/
profile wl-copy /{,usr/}bin/wl-copy flags=(attach_disconnected,attach_disconnected.path=@{att}) {
  include <abstractions/attached/base>
  include <abstractions/attached/consoles>
  include <abstractions/mime>
  include <abstractions/wayland-strict>

  @{exec_path} mr,

  @{bin}/cat rix,

  owner @{tmp}/wl-copy-buffer-@{rand6}/ rw,
  owner @{tmp}/wl-copy-buffer-@{rand6}/@{int} rw,

  include if exists <local/wl-copy>
}

# vim:syntax=apparmor
