apparmor.d/profiles/rtkit-daemon

45 lines
1.1 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/libexec/rtkit-daemon
profile rtkit-daemon @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
include <abstractions/nameservice-strict>
# To raise process nice and set scheduling policies (real-time) and priorities
capability sys_nice,
# To chroot /proc/
capability sys_chroot,
# To run daemon as rtkit:rtkit
capability setgid,
capability setuid,
# The two are visible in systemd service, but it doesn't seem they're needed
#capability dac_read_search,
#capability sys_ptrace,
@{exec_path} mr,
# When applying policies to processes
@{PROC}/@{pids}/stat r,
@{PROC}/@{pids}/task/@{tid}/stat r,
@{PROC}/@{pids}/limits r,
2020-12-10 22:33:39 +01:00
include if exists <local/rtkit-daemon>
}