summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-06-21 19:17:38 +0200
committerLennart Poettering <lennart@poettering.net>2017-06-26 15:14:41 +0200
commit9efb9df9e327932022ae78eee7f7979fa73b59ef (patch)
tree2eb6ed7c79849a9f217be0a8b74e1c44db56a428 /src/core/dbus-service.c
parentcore: permit FDSTORE=1 messages with non-pollable fds (diff)
downloadsystemd-9efb9df9e327932022ae78eee7f7979fa73b59ef.tar.xz
systemd-9efb9df9e327932022ae78eee7f7979fa73b59ef.zip
core: make NotifyAccess= and FileDescriptorStoreMax= available to transient services
This is helpful for debugging/testing #5606.
Diffstat (limited to 'src/core/dbus-service.c')
-rw-r--r--src/core/dbus-service.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/core/dbus-service.c b/src/core/dbus-service.c
index 85b67318ed..6458ee5c12 100644
--- a/src/core/dbus-service.c
+++ b/src/core/dbus-service.c
@@ -199,6 +199,39 @@ static int bus_service_set_transient_property(
return 1;
+ } else if (streq(name, "FileDescriptorStoreMax")) {
+ uint32_t u;
+
+ r = sd_bus_message_read(message, "u", &u);
+ if (r < 0)
+ return r;
+
+ if (mode != UNIT_CHECK) {
+ s->n_fd_store_max = (unsigned) u;
+ unit_write_drop_in_private_format(UNIT(s), mode, name, "FileDescriptorStoreMax=%" PRIu32, u);
+ }
+
+ return 1;
+
+ } else if (streq(name, "NotifyAccess")) {
+ const char *t;
+ NotifyAccess k;
+
+ r = sd_bus_message_read(message, "s", &t);
+ if (r < 0)
+ return r;
+
+ k = notify_access_from_string(t);
+ if (k < 0)
+ return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid notify access setting %s", t);
+
+ if (mode != UNIT_CHECK) {
+ s->notify_access = k;
+ unit_write_drop_in_private_format(UNIT(s), mode, name, "NotifyAccess=%s", notify_access_to_string(s->notify_access));
+ }
+
+ return 1;
+
} else if (streq(name, "ExecStart")) {
unsigned n = 0;