51 lines
1.2 KiB
Text
51 lines
1.2 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2018-2021 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} = @{sbin}/rsyslogd
|
|
profile rsyslogd @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/nameservice-strict>
|
|
|
|
capability chown, # For creating new log files and changing their owner/group
|
|
capability net_admin, # For remote logs
|
|
capability setgid, # For downgrading privileges
|
|
capability setuid,
|
|
capability sys_nice,
|
|
capability syslog,
|
|
|
|
network inet dgram,
|
|
network inet6 dgram,
|
|
|
|
signal receive set=hup peer=@{p_systemd},
|
|
|
|
@{exec_path} mr,
|
|
@{sh_path} mr,
|
|
|
|
@{lib}/@{multiarch}/rsyslog/*.so mr,
|
|
|
|
/etc/rsyslog.conf r,
|
|
/etc/rsyslog.d/{,**} r,
|
|
|
|
/var/log/** rw,
|
|
/var/spool/rsyslog/ r,
|
|
/var/spool/rsyslog/** rw,
|
|
|
|
@{run}/systemd/notify rw,
|
|
owner @{run}/rsyslogd.pid{,.tmp} rwk,
|
|
owner @{run}/systemd/journal/syslog w,
|
|
|
|
@{PROC}/1/environ r,
|
|
@{PROC}/cmdline r,
|
|
@{PROC}/kmsg r,
|
|
@{PROC}/sys/kernel/osrelease r,
|
|
|
|
include if exists <local/rsyslogd>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|