Commit Graph
33 Commits
Author SHA1 Message Date
Lennart Poettering aaab1f107c tree-wide: reference UAPI.20 spec that has been published for Varlink now
This updates a couple of links talking about Varlink:

1. anything that refers to specific Varlink concepts now point to the
   UAPI.20 spec

2. More general references to Varlink as a whole point to both the
   varlink.org domain and the spec.
2026-09-10 12:07:06 +01:00
Michael Vogt c944af8459 tree-wide: fix some double word errors like "the the"
By chance (because I had this mistake in my own commit) I noticed
that there are a bunch of duplicated works like "the the" in the
code and man-pages.

This commit fixes them and some similar issues with "and and" etc.
2026-07-09 13:09:52 +01:00
Lennart Poettering 52e6c185df varlinkctl: add 'list-sockets' verb 2026-06-23 23:10:01 +02:00
Lennart Poettering c83c21a054 man: drop redundant word from varlinkctl man page 2026-04-17 15:11:37 +01:00
Michael Vogt 34f29079fd varlinkctl: add new serve verb to allow wrapping command in varlink
With the new protocol upgrade support in varlinkctl client we can
now do the equivalent for the server side. This commit adds a new
`serve` verb that will serve any command that speaks stdin/stdout
via varlink and its protocol upgrade feature. This is the
"inetd for varlink".

This is useful for various reasons:
1. Allows to e.g. provide a heavily sandboxed io.myorg.xz.Decompress
   varlink endpoint, c.f. xz CVE-2024-3094)
2. Allow sftp over varlink which is quite useful with the
   varlink-http-bridge (that has more flexible auth mechanism than
   plain sftp).
3. Makes testing the varlinkctl client protocol upgrade simpler.
4. Because we can.
2026-04-09 13:02:09 +02:00
Michael Vogt 042f633b12 varlinkctl: add support for --exec with --upgrade
Having support for `--exec` when using `--upgrade` is nice so this
commit adds it. It does it by extracting a shared helper called
`exec_with_listen_fds()` and then use that in the `verb_call()`
and `varlink_call_and_upgrade()` calls.
2026-03-31 18:25:09 +02:00
Michael Vogt 0fc3f85d35 varlinkctl: add protocol upgrade support
The varlink spec supports protocol upgrades and they are very
useful to e.g. transfer binary data directly via varlink. So
far varlinkctl/sd-varlink was not supporting this. This commit
adds support for it in varlinkctl by using the new code in
sd-varlink and the generalized socket-forward code.
2026-03-31 18:25:09 +02:00
Lennart Poettering e2f23b6deb man: document new varlinkctl feature 2026-02-09 10:54:18 +01:00
Luca Boccassi a2d53619c0 varlinkctl: add support for polkit interactive auth 2025-12-17 23:22:05 +00:00
Lennart Poettering b4c2e2b970 varlinkctl: optionally push fds to server 2025-05-27 10:41:52 +02:00
Zbigniew Jędrzejewski-Szmek a0064690c6 man/varlinkctl: remove unneeded absolute path in example 2025-03-25 10:37:12 +01:00
Lennart Poettering fd2d435d97 varlinkctl: introduce new --exec switch
This new switch makes it possible to process fds attached to a varlink
reply: if specified it will execute a command line specified by the
caller, will pass the response json as stdin, and any fds acquired as
fd3, fd4, …
2025-02-20 18:12:12 +01:00
Jan Engelhardt 84d3266de1 man: grammar fixes for varlinkctl(1)
Fix some missing commas, missing conjunction words, wrong
inflections, and trim excess parenthesizing.
2024-12-25 17:24:39 +01:00
Jan Engelhardt c592ebdf4f man: grammar fixes for introductory adverbs/phrases 2024-12-25 17:24:38 +01:00
Jan Engelhardt 82ea392a99 man: grammar fixes for "regardless" 2024-12-25 17:00:31 +01:00
Jan Engelhardt 91dc2a52f5 man: grammar fixes: replace "respectively"
Unlike the German "bzw.", "respectively" cannot be used as an infix,
and is not abbreviated either.
2024-12-25 17:00:26 +01:00
Zbigniew Jędrzejewski-Szmek 2257be13fe tree-wide: time-out → timeout
For justification, see 3f9a0a522f.
2024-11-05 19:32:19 +00:00
Yu Watanabe c8f2409574 man/varlinkctl: fix typo
Follow-up for 39ce86d19c.
2024-09-07 22:24:58 +09:00
Lennart Poettering 39ce86d19c varlinkctl: add --timeout= switch to tweak time-out behaviour
Fixes: #33772
2024-09-07 07:35:39 +09:00
Antonio Alvarez Feijoo b268a71069 man/varlinkctl: add list-methods command to synopsis and fix typo
Follow-up for 16cfe84c24
2024-06-28 15:14:59 +02:00
Lennart Poettering e44e109baa varlink: add ability to invoke and talk to remote service binary via SSH 2024-06-27 10:56:51 +02:00
Lennart Poettering da213bb5c0 varlinkctl: add --graceful= option for optionally marking some errors as successes
This is generally useful, but in some cases particularly: when
implementing enumeration calls that use the "more" flag to return
multiple replies then for the first reply we need to return an error in
case the list of objects to enumerate is empty, usually so form of
"NoSuchXYZ" error. In many cases this shouldn't really be treated as
error, as an empty list probably more than not is as valid as a list
with one, two or more entries.
2024-06-20 18:20:09 +02:00
Lennart Poettering cd4e9166bb varlinkctl: add "-q" switch for suppressing varlinkctl output 2024-06-13 11:30:52 +02:00
Lennart Poettering 16cfe84c24 varlinkctl: add new list-methods verb
For putting together "varlinkctl call" command lines it's useful to
quickly enumerate all methods implemented by a service. Hence, let's add
a new "list-methods" which uses the introspection data of a service to
quickly list methods.

This is implemented as a special flavour of the "introspect" logic,
and just suppresses all output except for the method names.
2024-06-13 09:37:15 +02:00
Lennart Poettering 2475b0e81a varlinkctl: make interface argument to "introspect" optional, and allow more than one
let's make it easier to use the introspection functionality of
"varlinkctl": if no interface name is shown, display the introspection
data of all available interfaces. Moreover, allow that multiple
interfaces can be listed, in which case we enumerate them all.

This relieves the user from having to list interfaces first in order to
find the ones which to introspect.
2024-06-13 09:35:23 +02:00
Sam Leonard 9bfabe14e5 man: fix incorrect XML in man page 2024-04-15 10:40:11 +02:00
cunshunxia cc59d1014f man: fix a few issues in manpage
fix: #31482

Signed-off-by: cunshunxia <cunshunxia@tencent.com>
2024-03-20 15:24:11 +01:00
Lennart Poettering 7781d28fd7 varlinkctl: add new --collect switch
It exposes the varlink_collect() call we internally provide: it collects
all responses of a method call that is issued with the "more" method
call flag. It then returns the result as a single JSON array.
2024-02-12 12:04:18 +01:00
Lennart Poettering a1bb30de7f varlink: add "ssh:" transport
This uses openssh 9.4's -W support for AF_UNIX. Unfortunately older versions
don't work with this, and I couldn#t figure a way that would work for
older versions too, would not be racy and where we'd still could keep
track of the forked off ssh process.

Unfortunately, on older versions -W will just hang (because it tries to
resolve the AF_UNIX path as regular host name), which sucks, but hopefully this
issue will go away sooner or later on its own, as distributions update.

Fedora is still stuck at 9.3 at the time of posting this (even on
Fedora), even though 9.4, 9.5, 9.6 have all already been released by
now.

Example:
        varlinkctl call -j ssh:root@somehost:/run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt '{"text":"foobar"}'
2024-01-08 23:24:45 +01:00
David Tardon eea10b26f7 man: use same version in public and system ident. 2023-12-25 15:51:47 +01:00
David Tardon 13a69c120b man: use <simplelist> for 'See also' sections
This is just a slight markup improvement; there should be no difference
in rendering.
2023-12-23 08:28:57 +01:00
Yu Watanabe 939630ae28 varlink: fix typo
Follow-ups for #29325.
2023-10-07 15:48:22 +09:00
Lennart Poettering d408a53f78 varlinkctl: add new varlinkctl tool 2023-10-06 11:49:38 +02:00