apparmor.d/profiles/polkitd

44 lines
922 B
Text
Raw Normal View History

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
2020-12-10 22:33:39 +01:00
abi <abi/3.0>,
2020-12-10 22:33:39 +01:00
include <tunables/global>
@{exec_path} = /{usr/,}lib/polkit-1/polkitd
profile polkitd @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
include <abstractions/nameservice-strict>
# Tu run as polkitd:nogroup
capability setuid,
capability setgid,
2020-12-24 13:55:12 +01:00
# 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,
2020-10-25 10:23:34 +01:00
@{run}/systemd/sessions/* r,
@{run}/systemd/users/[0-9]* r,
2020-12-10 22:33:39 +01:00
include if exists <local/polkitd>
}