diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-06-21 19:17:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-06-26 15:14:41 +0200 |
commit | 9efb9df9e327932022ae78eee7f7979fa73b59ef (patch) | |
tree | 2eb6ed7c79849a9f217be0a8b74e1c44db56a428 /src/core/dbus-service.c | |
parent | core: permit FDSTORE=1 messages with non-pollable fds (diff) | |
download | systemd-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.c | 33 |
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; |