# 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/3.0>,

include <tunables/global>

@{exec_path} = @{bin}/systemd-mount
@{exec_path} += @{bin}/systemd-umount
profile systemd-mount @{exec_path} {
  include <abstractions/base>
  include <abstractions/disks-write>

  @{exec_path} mr,

  @{bin}/less  rPx -> child-pager,
  @{bin}/more  rPx -> child-pager,
  @{bin}/pager rPx -> child-pager,

  @{sys}/bus/ r,
  @{sys}/class/ r,

  owner @{PROC}/@{pid}/mountinfo r,

  include if exists <local/systemd-mount>
}
