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

abi <abi/4.0>,

include <tunables/global>

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

  @{exec_path} mr,

  @{sh_path}         rix,
  @{bin}/{,e}grep    rix,
  @{bin}/sed         rix,
  @{bin}/udevadm     rpx,

  /etc/hdparm.conf r,

  @{PROC}/cmdline r,
  @{PROC}/mdstat r,

  include if exists <local/udev-hdparm>
}

# vim:syntax=apparmor
