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