apparmor.d/profiles/polkitd
2021-04-01 16:17:47 +01:00

43 lines
922 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}lib/polkit-1/polkitd
profile polkitd @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice-strict>
# Tu run as polkitd:nogroup
capability setuid,
capability setgid,
# Needed?
audit deny capability net_admin,
@{exec_path} mr,
@{PROC}/@{pids}/stat r,
@{PROC}/@{pids}/cmdline r,
@{PROC}/@{pids}/task/@{tid}/stat r,
@{PROC}/@{pids}/cgroup r,
# System rules
/etc/polkit-1/rules.d/{,[0-9][0-9]-*.rules} r,
# Vendor rules
/usr/share/polkit-1/rules.d/{,*.rules} r,
# Vendor policies
/usr/share/polkit-1/actions/{,*.policy} r,
owner /var/lib/polkit-1/.cache/ rw,
@{run}/systemd/sessions/* r,
@{run}/systemd/users/[0-9]* r,
include if exists <local/polkitd>
}