]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-varlink: add sd_varlink_server_set_info
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 Dec 2024 19:08:33 +0000 (20:08 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 10 Dec 2024 09:43:14 +0000 (10:43 +0100)
commit29f63c67b01f8db9f088daa5d25b345cc697688d
tree913f28b881a5f4a938051a872fb67d33cb32a08e
parentfbee22c2373db393f796fb2942ecbb5fa4ddbeb7
sd-varlink: add sd_varlink_server_set_info

Fixes https://github.com/systemd/systemd/issues/35508.

As reported in the bug, the values were hardcoded for the systemd project.
https://varlink.org/Service lists vendor, product, version, url, and interfaces
as the mandatory parameters, so add an interface to set the first four. The
last field is set automatically based on the registered interfaces as before.

If the values are not filled in, we return empty strings. With NULL,
'varlinkctl info' would say:
  (string):1:25: Object field 'vendor' has wrong type null, expected string.
src/fuzz/fuzz-varlink.c
src/libsystemd/libsystemd.sym
src/libsystemd/sd-varlink/sd-varlink.c
src/libsystemd/sd-varlink/varlink-internal.h
src/systemd/sd-varlink.h