journald: fix ignored filtering patterns for delegated cgroups
authorQuentin Deslandes <qde@naccy.de>
Thu, 26 Jan 2023 18:44:10 +0000 (19:44 +0100)
committerQuentin Deslandes <qde@naccy.de>
Wed, 8 Feb 2023 15:52:51 +0000 (16:52 +0100)
commit41b7fcc5e8a66709ad5d6c7cdba1375539f7693d
tree6ebd54234139c497b121fddb16a2e91e11af5a60
parentee164216d38bc7ca51e040b90bdc96ed7518df37
journald: fix ignored filtering patterns for delegated cgroups

If a service defines Delegate=yes, its subcgroup won't inherit the
LogFilterPatterns= option, because the option is stored on the unit's
cgroup attributes, not on the subcgroup.

Fixed by using the unit's cgroup attributes instead.
src/journal/journald-client.c
test/testsuite-04.units/delegated-cgroup-filtering.service [new file with mode: 0644]
test/units/delegated_cgroup_filtering_payload.sh [new file with mode: 0755]
test/units/delegated_cgroup_filtering_payload_child.sh [new file with mode: 0755]
test/units/testsuite-04.sh