Commit Graph
86016 Commits
Author SHA1 Message Date
Nick Rosbrook a4750a6612 resolvectl: add print_configuration() to consolidate status logic
There is a lot of duplication across the functions for printing global,
link, and delegate output. Since these all use a common DNSConfiguration
type now, the logic can be consolidated.

Adapt printing and format helper functions to accept a DNSConfiguration
parameter to appropriately format output. Then, add print_configuration(),
a single function that prints the appropriate status output based on the
contents of DNSConfiguration.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 480ebdfddd resolvectl: consolidate JSON and regular status output paths
Now that varlink is always used for status output, consolidate the JSON
and regular status code paths. Add status_full(), which is the single
point that calls DumpDNSConfiguration, filters based on link names and
mode if needed, and prints the output in the appropriate format.

This simplifies status_ifindex(), and removes the need for a separate
status_json().
2026-02-03 15:07:41 -05:00
Nick Rosbrook 67746cd3b2 resolvectl: use varlink to report delegate status
This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular delegate status output using the DumpDNSConfiguration
varlink method. And, remove the DelegateInfo type and associated functions
which were used to map dbus properties.

Since this is the last type of status output to be switched to varlink,
lots of other code becomes dead with these changes, e.g.
read_dns_server_one(), map_dns_servers_internal(), etc., so remove those
too. Finally, status_all() no longer needs sd_bus, so drop that
parameter.
2026-02-03 15:07:41 -05:00
Nick Rosbrook d076d0f94f resolvectl: use varlink to report link status
This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular link status output using the DumpDNSConfiguration
varlink method. And, remove the LinkInfo type and associated functions
which were used to map dbus properties.
2026-02-03 15:07:41 -05:00
Nick Rosbrook a56366182e resolvectl: use varlink to report global status
This is an incremental commit to replacing dbus usage with varlink for
all status output.

Re-implement regular global status output using the DumpDNSConfiguration
varlink method. And, remove the GlobalInfo type and associated functions
which were used to map dbus properties.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 7bfc82bf5a dns-configuration: use OrderedSet for servers and domains
This only has a small effect, which mostly matters for generating status
output. It ensures that the order of servers and domains displayed
matches the order they are stored on the daemon side, which keeps the
new resolvectl output consistent with the old.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 8894f29a4e dns-configuration: add DNSSEC support boolean to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook d9757721ab dns-configuration: add in_addr_union field to DNSServer type
This makes it easier to use DNSServer with helpers from in-addr-util.h.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 8731d33b58 dns-configuration: dispatch delegate name to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 3afb9c20b6 dns-configuration: dispatch scopes to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.

Introduce a DNSScope type, and all required JSON dispatching helpers.
2026-02-03 15:07:41 -05:00
Nick Rosbrook e90180f50c dns-configuration: dispatch resolv conf mode to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 4a8f4efd44 dns-configuration: dispatch negative trust anchors to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook d3b60567d7 dns-configuration: dispatch fallback servers to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook fb0bd15d15 dns-configuration: dispatch all protocol modes to DNSConfiguration
This is one of several commits to dispatch all fields of the
DNSConfiguration JSON.
2026-02-03 15:07:41 -05:00
Nick Rosbrook 271f7630a2 shared: move wait-online's dns-configuration.[ch] to shared 2026-02-03 15:07:41 -05:00
Nick Rosbrook 9b2f263f30 resolve: add DNSConfiguration field to indicate DNSSEC support
The varlink API is currently missing the "DNSSEC supported" field, which
is required for to re-implement the existing resolvectl status output
with varlink instead of dbus.

Add this field to DNSConfiguration.
2026-02-03 15:07:41 -05:00
Yu Watanabe 503a788332 Introduce name_to_handle_at_u64() helper function and use it for getting pidfd ID and cgroup ID (#40500) 2026-02-04 04:37:07 +09:00
Yu Watanabe 06432cca43 Portabled capsule fixes (#40427) 2026-02-04 02:53:16 +09:00
Yu Watanabe ede1caeada cgroup-util: declare file_handle union in cg_cgroupid_open()
This also effectively reverts eb2e91b981,
as now the object is only used as input, and kernel would need to handle
input with only ID no matter whether the struct later gets extended.
2026-02-04 02:45:17 +09:00
Yu Watanabe f37931bd78 tree-wide: replace cg_{fd,path}_get_cgroupid() with {fd,path}_to_handle_u64() 2026-02-04 02:45:17 +09:00
Yu Watanabe 2eab8fa1e4 pidfd-util: use fd_to_handle_u64() 2026-02-04 02:45:17 +09:00
Yu Watanabe e7ce1e22b9 mountpoint-util: introduce name_to_handle_at_u64() and friends
They will be used later.
2026-02-04 02:45:06 +09:00
Yu Watanabe 09811ccaa1 mountpoint-util: make name_to_handle_at_loop() gracefully handle NULL path 2026-02-04 00:07:02 +09:00
Yu Watanabe 055ceec666 journal: avoid strjoina()/newa() (#40489)
Fixes #40456.
2026-02-03 23:42:23 +09:00
Yu Watanabe f2a54dac72 vmspawn/firstboot/homectl: fixes for plymouth (#40558) 2026-02-03 23:38:38 +09:00
Yu Watanabe 50ddcf8554 udev: create /run/udev/queue file earlier (#40518)
When udevd received a uevent or inotify event, then we will queue
events. To minimize the race between processing these events by udevd
and user invocation of 'udevadm settle', let's create /run/udev/queue
file earlier.
On some errors, no event may be queued, but in that case, the file will
be removed by the post event source if nothing queued. See on_post().

Hopefully mitigate the issue #40499.
2026-02-03 23:36:28 +09:00
Daan De Meyer ae6dcaff0d portable: Don't refuse copying out instance of template that exists
There's no reason to refuse copying out capsule@abc.service even if
capsule@.service already exists on the host, so let's optionally not
search for templates if we can't find an instance when looking up
units and use it in portabled.
2026-02-03 15:03:51 +01:00
Daan De Meyer 4d388536ee tree-wide: Allow running capsules as any user
For many use cases DynamicUser= just doesn't cut it. Specifically lots
of stuff wants to run as root. Let's support this use case by relaxing
our checks for capsules a bit.
2026-02-03 15:00:32 +01:00
Daan De Meyer b231c4dcb4 core: Improve logging when we cannot create destination mountpoint
If we fail to create a parent directory, then the error from
make_mount_point_inode_from_path() will always be
"No such file or directory" which doesn't tell us anything. Add logging
for the mkdir_parents() call as well so we get a useful error.
2026-02-03 15:00:32 +01:00
Yu Watanabe eb5b797d7c journal: check validity of PID field in syslog/kmsg earlier
Then, let's make syslog_parse_identifier() returns PID as pid_t, rather
than the string.

This also makes the function refuse ridiculously long identifier.

Fixes #40456.
Fixes oss-fuzz#477990732 (https://issues.oss-fuzz.com/issues/477990732).
2026-02-03 21:55:49 +09:00
Yu Watanabe dd839b1463 parse-util: rename trivial argument for parse_pid()
The function parse_pid() trivially returns pid, hence it is not
necessary to name the argument for storing result as 'ret_pid'.
2026-02-03 21:43:17 +09:00
Yu Watanabe 7e81423fb8 journal: check the length of timestamp field in syslog message
No functional change. Just refactoring and adding assertion.
2026-02-03 21:43:17 +09:00
Yu Watanabe 8d607f93b7 journal: make security label always NUL-terminated
Then, we can drop label_len or label_size arguments at various places.

While doing this, SCM_SECURITY is now ignored when SELinux is disabled
or when it contains embedded NUL.
2026-02-03 21:43:17 +09:00
Yu Watanabe 0dcbb30f49 fuzz: assume all reproducers as binary
Even if parsers expect text data, reproducers may not be suitable
for being handled as a text file.
2026-02-03 21:43:17 +09:00
Yu Watanabe dc709eff0b udev: create /run/udev/queue file earlier
When udevd received a uevent or inotify event, we will queue or trigger
synthesized events. To minimize the race between processing these events
by udevd and user invocation of 'udevadm settle', let's create /run/udev/queue
file earlier.
On some errors, no event may be queued, but in that case, the file will
be removed by the post event source if nothing queued. See on_post().

Hopefully mitigate the issue #40499.
2026-02-03 21:25:01 +09:00
Yu Watanabe b7363d3330 udev: remember UUIDs of triggered events
Otherwise, /run/udev/queue file may be removed before udevd receives
the triggered uevents. This avoids the following race:

1. uevent A is being processed,
2. received an inotify event and trigger a synthesized uevent,
3. uevent A has been processed,
4. the uevent queue becomes empty, and /run/udev/queue is removed,
5. received and queued the synthesized uevent, and /run/udev/queue is recreated.

With this patch, /run/udev/queue is not removed in step 4. Hence,
'udevadm settle' will wait for the synthesized event being processed.

This is similar to waiting for child processes that reread partitions
(thus trigger synthetic events) being terminated, but for synthetic
events triggered by the manager.
2026-02-03 21:25:01 +09:00
Yu Watanabe 95b40e4cf3 udev/watch: drop redundant argument
The arguments dev and target are always same.
2026-02-03 21:25:01 +09:00
Luca Boccassi 75cb25c0b9 firstboot/homectl: hide plymouth splashscreen when asking questions
When plymouth is enabled, the screen gets all garbled when firstboot
runs and asks questions. Disable the splash screen, but only when
actually asking questions.
2026-02-03 13:21:03 +01:00
Thorsten Kukuk a40d934007 getty: remove --issue-file parameter
agetty from util-linux is meanwhile following the configuration file
specification for /etc/issue. The usage of "--issue-file" breaks this
on distributions with current util-linux.
2026-02-03 21:00:19 +09:00
Yu Watanabe 4e5ceed9c5 ssh-generator: several cleanups (#40556) 2026-02-03 20:59:18 +09:00
Zbigniew Jędrzejewski-Szmek 65040d0876 Followups for the recent chagnes to stability statements (#40540) 2026-02-03 12:50:39 +01:00
Zbigniew Jędrzejewski-Szmek 2cbea2dd75 docs: update old man page links to the official location 2026-02-03 12:49:37 +01:00
Zbigniew Jędrzejewski-Szmek d905ac0da1 docs/INCOMPATIBILITIES: describe the new meson option 2026-02-03 12:49:37 +01:00
Luca Boccassi 7f7622285d homectl: trim some trailing whitespace 2026-02-03 12:47:12 +01:00
Luca Boccassi 610d8c3dfc vmspawn: do not pass console=hvc0 in GUI mode
This breaks when using qemu's GUI mode. Follow mkosi's example.

Follow-up for 773ca1def8
2026-02-03 10:50:34 +01:00
Yu Watanabe 0375558799 github/linter: disable ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT and update super-linter to 8.4.0 (#40554) 2026-02-03 17:44:10 +09:00
Yu Watanabe 9b011d3f5e ssh-generator: drop unused variable 2026-02-03 16:50:00 +09:00
Yu Watanabe 9666541a56 ssh-generator: drop redundant check
The loop STRV_FOREACH() below does nothing if the strv is empty.
2026-02-03 16:50:00 +09:00
Yu Watanabe 70510c2c90 ssh-generator: fix memleak 2026-02-03 16:50:00 +09:00
Yu Watanabe 65b50ae2c8 sd-bus: do not log in higher than LOG_DEBUG from library
Follow-up for 6c8de404c9.

This also adds full stop to the log message, and make "vs" followed by
dot for consistency to other messages.
2026-02-03 16:49:46 +09:00