summaryrefslogtreecommitdiff
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-09-09 16:12:55 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2021-09-20 13:53:11 +0100
commit064a5c1438690f9454ad9bff05ec4ec2acfa67d2 (patch)
treeeb03352f75a79307dd38d86e913b3e1a52521eaf /src/core/manager.h
parentf2ed82d5107cfe557470958a7c0857202952aac3 (diff)
downloadsystemd-064a5c1438690f9454ad9bff05ec4ec2acfa67d2.tar.gz
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.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 1220c9fb16..c60f9fa9b2 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -446,8 +446,11 @@ struct Manager {
bool honor_device_enumeration;
VarlinkServer *varlink_server;
- /* Only systemd-oomd should be using this to subscribe to changes in ManagedOOM settings */
- Varlink *managed_oom_varlink_request;
+ /* When we're a system manager, this object manages the subscription from systemd-oomd to PID1 that's
+ * used to report changes in ManagedOOM settings (systemd server - oomd client). When
+ * we're a user manager, this object manages the client connection from the user manager to
+ * systemd-oomd to report changes in ManagedOOM settings (systemd client - oomd server). */
+ Varlink *managed_oom_varlink;
};
static inline usec_t manager_default_timeout_abort_usec(Manager *m) {