apparmor.d/apparmor.d/groups/systemd/systemd-timedated
Alexandre Pujol 4e5f4cb06a
feat: profiles and integration tests improvments.
Add the udbus variable to be used in `unix bind` rule for dbus.
2024-11-19 19:04:27 +00:00

45 lines
1.1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2022 Mikhail Morfikov
# Copyright (C) 2022-2024 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/4.0>,
include <tunables/global>
@{exec_path} = @{lib}/systemd/systemd-timedated
profile systemd-timedated @{exec_path} flags=(attach_disconnected) {
include <abstractions/base>
include <abstractions/bus-system>
include <abstractions/common/systemd>
capability sys_time,
unix (bind) type=stream addr=@@{udbus}/bus/systemd-timedat/system,
#aa:dbus own bus=system name=org.freedesktop.timedate1
dbus send bus=system path=/org/freedesktop/systemd1/unit/*
interface=org.freedesktop.DBus.Properties
member=GetAll
peer=(name=org.freedesktop.systemd1, label="@{p_systemd}"),
@{exec_path} mr,
@{etc_rw}/.#adjtime* rw,
@{etc_rw}/adjtime rw,
/etc/.#localtime* rw,
/etc/localtime rw,
/etc/.#timezone* rw,
/etc/timezone rw,
@{att}/@{run}/systemd/notify rw,
/dev/rtc@{int} r,
include if exists <local/systemd-timedated>
}
# vim:syntax=apparmor