]> git.ipfire.org Git - thirdparty/systemd.git/commit
oom: Add support for user unit ManagedOOM property updates 20690/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 9 Sep 2021 15:12:55 +0000 (16:12 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 20 Sep 2021 12:53:11 +0000 (13:53 +0100)
commit064a5c1438690f9454ad9bff05ec4ec2acfa67d2
treeeb03352f75a79307dd38d86e913b3e1a52521eaf
parentf2ed82d5107cfe557470958a7c0857202952aac3
oom: Add support for user unit ManagedOOM property updates

Compared to PID1 where systemd-oomd has to be the client to PID1
because PID1 is a more privileged process than systemd-oomd, systemd-oomd
is the more privileged process compared to a user manager so we have
user managers be the client whereas systemd-oomd is now the server.

The same varlink protocol is used between user managers and systemd-oomd
to deliver ManagedOOM property updates. systemd-oomd now sets up a varlink
server that user managers connect to to send ManagedOOM property updates.

We also add extra validation to make sure that non-root senders don't
send updates for cgroups they don't own.

The integration test was extended to repeat the chill/bloat test using
a user manager instead of PID1.
13 files changed:
src/basic/def.h
src/core/core-varlink.c
src/core/manager.c
src/core/manager.h
src/oom/oomd-manager.c
src/oom/oomd-manager.h
src/oom/oomd.c
test/test-functions
test/units/testsuite-55.service
test/units/testsuite-55.sh
units/meson.build
units/systemd-oomd.service.in
units/systemd-oomd.socket [new file with mode: 0644]