2020-09-12 17:19:23 +02:00
|
|
|
# vim:syntax=apparmor
|
|
|
|
# ------------------------------------------------------------------
|
|
|
|
#
|
2021-01-10 16:35:07 +01:00
|
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
2020-09-12 17:19:23 +02:00
|
|
|
#
|
|
|
|
# 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-09-12 17:19:23 +02:00
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include <tunables/global>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{exec_path} = /{usr/,}lib/systemd/systemd-journald
|
|
|
|
profile systemd-journald @{exec_path} {
|
2020-12-10 22:33:39 +01:00
|
|
|
include <abstractions/base>
|
|
|
|
include <abstractions/consoles>
|
|
|
|
include <abstractions/systemd-common>
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
capability syslog,
|
|
|
|
capability sys_ptrace,
|
|
|
|
capability dac_read_search,
|
|
|
|
|
|
|
|
@{exec_path} mr,
|
|
|
|
|
|
|
|
/etc/systemd/journald.conf r,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/log/ rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
/{run,var}/log/journal/ rw,
|
|
|
|
/{run,var}/log/journal/[0-9a-f]*/ rw,
|
|
|
|
/{run,var}/log/journal/[0-9a-f]*/user-[0-9a-f]*.journal* rw,
|
|
|
|
/{run,var}/log/journal/[0-9a-f]*/system.journal* rw,
|
|
|
|
/{run,var}/log/journal/[0-9a-f]*/system@[0-9a-f]*.journal* rw,
|
|
|
|
/{run,var}/log/journal/[0-9a-f]*/fss rw,
|
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
owner @{run}/systemd/journal/{,**} rw,
|
|
|
|
owner @{run}/systemd/notify rw,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
2020-10-25 10:23:34 +01:00
|
|
|
@{run}/udev/data/c189:[0-9]* r, # for /dev/bus/usb/**
|
|
|
|
@{run}/udev/data/c10:224 r, # for /dev/tpm0
|
|
|
|
@{run}/udev/data/+usb:* r,
|
|
|
|
@{run}/udev/data/+pci:* r,
|
|
|
|
@{run}/udev/data/+hid:* r,
|
|
|
|
@{run}/udev/data/+acpi:* r,
|
|
|
|
@{run}/udev/data/+scsi:* r,
|
|
|
|
@{run}/udev/data/+bluetooth:* r,
|
|
|
|
@{run}/udev/data/+usb-serial:* r,
|
|
|
|
@{run}/udev/data/+platform:regulatory.[0-9]* r,
|
|
|
|
@{run}/udev/data/+platform:simple-framebuffer.[0-9]* r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{sys}/devices/**/uevent r,
|
|
|
|
@{sys}/firmware/efi/efivars/SecureBoot-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* r,
|
2020-12-10 22:33:39 +01:00
|
|
|
@{sys}/module/printk/parameters/time r,
|
2020-09-12 17:19:23 +02:00
|
|
|
|
|
|
|
@{PROC}/@{pids}/comm r,
|
|
|
|
@{PROC}/@{pids}/cmdline r,
|
|
|
|
@{PROC}/@{pids}/attr/current r,
|
|
|
|
@{PROC}/@{pids}/sessionid r,
|
|
|
|
@{PROC}/@{pids}/loginuid r,
|
|
|
|
@{PROC}/@{pids}/cgroup r,
|
|
|
|
@{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
@{PROC}/sys/kernel/hostname r,
|
|
|
|
|
|
|
|
/dev/kmsg rw,
|
|
|
|
|
|
|
|
/var/lib/dbus/machine-id r,
|
|
|
|
/etc/machine-id r,
|
|
|
|
|
2020-12-10 22:33:39 +01:00
|
|
|
include if exists <local/systemd-journald>
|
2020-09-12 17:19:23 +02:00
|
|
|
}
|