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

# Listing for power supply devices. Used to enumerate power sources and
# determine if the system is on AC or battery.

  abi <abi/4.0>,

  @{sys}/class/power_supply/ r,

  @{sys}/devices/**/power_supply/*/ r,
  @{sys}/devices/**/power_supply/*/capacity r,
  @{sys}/devices/**/power_supply/*/capacity_level r,
  @{sys}/devices/**/power_supply/*/cycle_count r,
  @{sys}/devices/**/power_supply/*/energy_full r,
  @{sys}/devices/**/power_supply/*/energy_full_design r,
  @{sys}/devices/**/power_supply/*/energy_now r,
  @{sys}/devices/**/power_supply/*/manufacturer r,
  @{sys}/devices/**/power_supply/*/model_name r,
  @{sys}/devices/**/power_supply/*/online r,
  @{sys}/devices/**/power_supply/*/power_now r,
  @{sys}/devices/**/power_supply/*/present r,
  @{sys}/devices/**/power_supply/*/scope r,
  @{sys}/devices/**/power_supply/*/serial_number r,
  @{sys}/devices/**/power_supply/*/status r,
  @{sys}/devices/**/power_supply/*/technology r,
  @{sys}/devices/**/power_supply/*/type r,
  @{sys}/devices/**/power_supply/*/usb_type r,
  @{sys}/devices/**/power_supply/*/voltage_min_design r,
  @{sys}/devices/**/power_supply/*/voltage_now r,

  include if exists <abstractions/sys/power-supply.d>

# vim:syntax=apparmor
