apparmor.d/apparmor.d/profiles-m-z/wpa-supplicant
2021-04-02 10:18:29 +01:00

55 lines
1.6 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}{s,}bin/wpa_supplicant
profile wpa-supplicant @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice>
include <abstractions/openssl>
# To remove the following errors:
# wpa_supplicant[]: wlan0: Failed to initialize driver interface
capability net_admin,
capability net_raw,
# To remove the following errors:
# wpa_supplicant[]: Failed to initialize control interface 'DIR=/run/wpa_supplicant
# GROUP=netdev'. You may have another wpa_supplicant process already running or the file was
# left by an unclean termination of wpa_supplicant in which case you will need to manually
# remove this file before starting wpa_supplicant again.
capability chown,
# Needed? (#FIXME#)
capability fsetid,
audit deny capability sys_module,
network packet raw,
network packet dgram,
@{exec_path} mr,
owner @{run}/wpa_supplicant/{,**} rw,
/etc/wpa_supplicant/wpa_supplicant.conf r,
/etc/libnl/{classid,pktloc} r,
/dev/rfkill r,
@{PROC}/sys/net/ipv[4,6]/conf/wlan[0-9]/drop_* rw,
@{PROC}/sys/net/ipv[4,6]/conf/wlp*/drop_* rw,
@{sys}/devices/pci[0-9]*/**/ieee80211/phy[0-9]/name r,
# For wpa_gui
#capability dac_override,
#/etc/wpa_supplicant/wpa_supplicant.conf w,
#/etc/wpa_supplicant/wpa_supplicant.conf.tmp rw,
include if exists <local/wpa-supplicant>
}