From d29bee2789e6b9c735a46be7c976446e8890d719 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sat, 4 Feb 2023 23:56:56 +0000 Subject: [PATCH] feat(profiles): add chronyd. --- apparmor.d/profiles-a-f/chronyd | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apparmor.d/profiles-a-f/chronyd diff --git a/apparmor.d/profiles-a-f/chronyd b/apparmor.d/profiles-a-f/chronyd new file mode 100644 index 00000000..a7344d9d --- /dev/null +++ b/apparmor.d/profiles-a-f/chronyd @@ -0,0 +1,37 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}{s,}bin/chronyd +profile chronyd @{exec_path} flags=(attach_disconnected) { + include + include + + capability dac_override, + capability dac_read_search, + capability net_bind_service, + capability setgid, + capability setuid, + capability sys_time, + + network inet dgram, + network inet6 dgram, + network netlink raw, + + @{exec_path} mr, + + /etc/chrony.conf r, + /etc/chrony.d/{,*} r, + + /var/lib/chrony/drift* rw, + + @{run}/chrony-dhcp/ r, + @{run}/chrony/chronyd.pid rw, + @{run}/chrony/chronyd.sock rw, + + include if exists +} \ No newline at end of file