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

include <tunables/global>

@{exec_path} = @{lib}/{,NetworkManager/}nm-dhcp-helper
@{att} = ""
profile nm-dhcp-helper /{,usr/}lib{,exec,32,64}/{,NetworkManager/}nm-dhcp-helper flags=(complain) {
  include <abstractions/base-strict>
  include <abstractions/bus-system>

  network inet dgram,
  network inet6 dgram,

  ptrace (readby) peer=NetworkManager,

  signal (receive) peer=NetworkManager,
  signal (send) peer=dhclient,

  @{exec_path} mr,

  /var/lib/NetworkManager/*lease r,

  @{run}/NetworkManager/private-dhcp rw,

  include if exists <local/nm-dhcp-helper>
}

# vim:syntax=apparmor
