apparmor.d/profiles/polkitd

51 lines
1.2 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# Copyright (C) 2018-2021 Mikhail Morfikov
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
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>
}