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

abi <abi/4.0>,

include <tunables/global>

@{att} = /att/postgres-systemctl/
profile postgres-systemctl flags=(attach_disconnected,attach_disconnected.path=@{att},complain) {
  include <abstractions/attached/base>
  include <abstractions/app/systemctl>

  capability net_admin,
  capability sys_resource,

  signal send set=(term cont winch) peer=systemd-tty-ask-password-agent,

  @{bin}/systemd-tty-ask-password-agent px,

  include if exists <local/postgres-systemctl>
}

# vim:syntax=apparmor
