Skip to content

Commit

Permalink
Merge pull request #54 from mdegat01/aa-journal-variable
Browse files Browse the repository at this point in the history
Journald variable in apparmor profile
  • Loading branch information
mdegat01 authored Apr 11, 2021
2 parents 87d1dca + 8f96c0a commit 22514ca
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions promtail/apparmor.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include <tunables/global>

# Systemd Journal location
@{journald}=/var/log/journal/{,**} @{run}/log/journal/{,**}

profile promtail flags=(attach_disconnected,mediate_deleted) {
include <abstractions/base>

Expand Down Expand Up @@ -39,15 +42,15 @@ profile promtail flags=(attach_disconnected,mediate_deleted) {
@{etc_rw}/promtail/{,**} rw,
/share/{,**} r,
/ssl/{,**} r,
/var/log/journal/{,**} r,
@{journald} r,

# Programs
/usr/bin/promtail cx,
/usr/bin/yq Cx,

# Shell access
owner @{HOME}/.* rw,
/etc/bash.bashrc r,
@{etc_ro}/bash.bashrc r,

profile /usr/bin/promtail flags=(attach_disconnected,mediate_deleted) {
include <abstractions/base>
Expand All @@ -68,8 +71,7 @@ profile promtail flags=(attach_disconnected,mediate_deleted) {
/data/promtail/** rwk,

# Log sources
@{run}/log/journal/{,**} r,
/var/log/journal/{,**} r,
@{journald} r,
/share/** r,

# Config
Expand Down

0 comments on commit 22514ca

Please sign in to comment.