Add two profiles directory to have smaller dir.

This commit is contained in:
Alexandre Pujol 2021-09-15 16:55:27 +01:00
parent 6c0ae4ddc1
commit d95a876424
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
521 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,54 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2018-2021 Mikhail Morfikov
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
# Debugging the syslogger can be difficult if it can't write to the file
# that the kernel is logging denials to. In these cases, you can do the
# following:
# watch -n 1 'dmesg | tail -5'
@{exec_path} = /{usr/,}{s,}bin/rsyslogd
profile rsyslogd @{exec_path} {
include <abstractions/base>
include <abstractions/nameservice>
# Needed to remove the following error:
# rsyslogd[]: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
capability syslog,
# For remote logs
capability net_admin,
# for creating new log files and changing their owner/group
capability chown,
# Needed?
deny capability sys_nice,
@{exec_path} mr,
/{usr/,}lib/@{multiarch}/rsyslog/*.so mr,
# rsyslog configuration
/etc/rsyslog.conf r,
/etc/rsyslog.d/{,**} r,
/var/spool/rsyslog/ r,
/var/spool/rsyslog/** rw,
owner @{run}/rsyslogd.pid{,.tmp} rwk,
owner @{run}/systemd/journal/syslog w,
# log files and devices
/var/log/** rw,
@{PROC}/kmsg r,
# a cert for gtls module
/etc/CA/*.crt r,
/etc/CA/*.key r,
include if exists <local/rsyslogd>
}