apparmor.d/profiles/dbus-daemon

60 lines
1.4 KiB
Text
Raw Normal View History

# vim:syntax=apparmor
# ------------------------------------------------------------------
#
2021-01-10 16:35:07 +01:00
# Copyright (C) 2020-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/,}bin/dbus-daemon
profile dbus-daemon @{exec_path} {
2020-12-10 22:33:39 +01:00
include <abstractions/base>
2021-02-13 15:00:16 +01:00
include <abstractions/consoles>
2020-12-10 22:33:39 +01:00
include <abstractions/nameservice-strict>
capability setgid,
capability setuid,
capability sys_resource,
signal (receive) set=(term, kill),
2020-12-10 22:33:39 +01:00
network netlink raw,
2021-03-14 18:57:00 +01:00
network bluetooth stream,
network bluetooth seqpacket,
@{exec_path} mr,
/usr/libexec/* rPUx,
owner @{PROC}/@{pid}/mounts r,
owner @{PROC}/@{pid}/oom_score_adj rw,
@{PROC}/@{pids}/cmdline r,
@{PROC}/sys/kernel/random/boot_id r,
/usr/share/dbus-1/ r,
/usr/share/dbus-1/** r,
/etc/dbus-1/ r,
/etc/dbus-1/** r,
/usr/share/defaults/**.conf r,
2020-12-10 22:33:39 +01:00
@{sys}/module/apparmor/parameters/enabled r,
2020-10-25 10:23:34 +01:00
@{run}/systemd/users/[0-9]* r,
owner @{run}/user/[0-9]*/dbus-1/ rw,
owner @{run}/user/[0-9]*/dbus-1/services/ rw,
# file_inherit
owner /dev/tty[0-9]* rw,
2020-12-10 22:33:39 +01:00
include if exists <local/dbus-daemon>
}