61 lines
1.4 KiB
Text
61 lines
1.4 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2018-2021 Mikhail Morfikov
|
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}lib/polkit-1/polkitd
|
|
@{exec_path} += @{libexec}/polkitd
|
|
profile polkitd @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/dbus-strict>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability setuid,
|
|
capability setgid,
|
|
capability sys_ptrace,
|
|
audit deny capability net_admin,
|
|
|
|
ptrace (read),
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{PROC}/@{pids}/stat r,
|
|
@{PROC}/@{pids}/cmdline r,
|
|
@{PROC}/@{pids}/task/@{tid}/stat r,
|
|
@{PROC}/@{pids}/cgroup r,
|
|
@{PROC}/sys/kernel/osrelease r,
|
|
@{PROC}/1/environ r,
|
|
@{PROC}/cmdline r,
|
|
|
|
/etc/machine-id r,
|
|
|
|
# System rules
|
|
/etc/polkit-1/rules.d/ r,
|
|
/etc/polkit-1/rules.d/[0-9][0-9]-*.rules r,
|
|
/etc/polkit-1/localauthority/{,**} r,
|
|
/etc/polkit-1/localauthority.conf.d/{,**} r,
|
|
|
|
# Vendor rules
|
|
/usr/share/polkit-1/rules.d/ r,
|
|
/usr/share/polkit-1/rules.d/*.rules r,
|
|
|
|
# Vendor policies
|
|
/usr/share/polkit-1/actions/ r,
|
|
/usr/share/polkit-1/actions/*.policy r,
|
|
/usr/share/polkit-1/actions/*.policy.choice r,
|
|
|
|
owner /var/lib/polkit-1/.cache/ rw,
|
|
/var/lib/polkit-1/localauthority/{,**} r,
|
|
|
|
@{run}/systemd/sessions/* r,
|
|
@{run}/systemd/users/@{uid} r,
|
|
|
|
# Silencer
|
|
deny /.cache/ rw,
|
|
|
|
include if exists <local/polkitd>
|
|
}
|