Commit Graph

83008 Commits

Author SHA1 Message Date
Nick Owens
8acee7c35e docs: fix SurviveFinalKillSignal typo 2025-07-22 18:03:39 +01:00
Luca Boccassi
bfeaefebf2 docs: mention LoaderTpm2ActivePcrBanks in BLI
Follow-up for 6eab4cd44c
2025-07-22 17:05:21 +02:00
Mike Yuan
8c7dfa0ff4 units/ssh-access.target: enable StopWhenUnneeded=
This combines nicely with the X_SYSTEMD_UNIT_INACTIVE= notification
we send out, to ensure when all sshd units go down the actual
status is always reflected on the target.
2025-07-22 15:01:26 +01:00
Philip Freeman
72775b7c89 Update USER_RECORD.md (#38283)
trailing comma here is invalid json.
2025-07-22 18:27:37 +09:00
Yu Watanabe
0c699debde varlink-idl: fix type of ProcessId.bootId
Fixes a bug in 0fc530d157 (v257).
Fixes #38276.
2025-07-22 01:11:12 +01:00
Yu Watanabe
94ad755008 ci/build-test: install libarchive-dev
Previously, the package was not installed, hence the feature was always
disabled in the build test.
2025-07-22 01:09:47 +01:00
Yu Watanabe
2cfa513356 test: missing -v option for command
Otherwise the specified command is invoked, not only checking the
existence of the command.
2025-07-22 01:08:43 +01:00
Yu Watanabe
911a52b769 test-sd-device: also exclude dm block devices
To avoid the following error:
```
test_sd_device_one(/sys/devices/virtual/block/dm-9)
src/libsystemd/sd-device/test-sd-device.c:104: Assertion failed: Expected "sd_device_new_from_syspath(&dev, syspath)" to succeed, but got error: -19/ENODEV
```

This also updates outdates comment about CentOS CI.
2025-07-22 01:04:42 +01:00
Beniamino Galvani
8f5eaeb143 sd-dhcp6-lease: fix calculation of t2
sd_dhcp6_lease_get_t2() was returning t1, and so the client was going directly
to the rebind state skipping the lease renewal.

Reported-by: Jaime Caamano <jcaamano@redhat.com>
Fixes: 394fac52d0 ("sd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friends")
2025-07-22 02:15:43 +09:00
Yu Watanabe
7107cfbf4f bootctl: do not fail when the same file is updated multiple times
In the second or later trial, copy_file_with_version_check() -> version_check()
fails with -ESRCH. Let's ignore the failure.

This also adds missing assertions in update_efi_boot_binaries(), and
drop redundant version check in update_efi_boot_binaries(), as version
will be anyway checked later.

Fixes a regression caused by 929f41c652.
Fixes #33392.
2025-07-21 16:07:08 +01:00
Mike Yuan
a00078e8c8 sd-event: fix infinite loop in inotify event handling (#38268)
Fixes #38265.
2025-07-21 10:14:58 +02:00
Yu Watanabe
b92258eb22 test: add test case for issue #38265 2025-07-20 02:18:03 +09:00
Yu Watanabe
064b9b2bb3 sd-event: drop inotify event from buffer when no event source is triggered
Even when we receive an inotify event, there is no relevant event source
exists. In that case, we need to drop the event from the buffer,
otherwise we cannot escape from the loop.

Fixes #38265.
2025-07-20 02:14:44 +09:00
Mike Yuan
879ed340a1 core/service: drop job done messages identical to generic ones
Prompted by #38263
2025-07-20 00:56:21 +09:00
Yu Watanabe
0021f7fdf4 test: add test case for getenv_for_pid() 2025-07-19 13:35:27 +01:00
Yu Watanabe
231cee5bdb vmspawn: use poll.h rather than sys/poll.h
This does not change anything, as poll.h is a one-line wrapper of sys/poll.h.
Note that man pages e.g. poll(2) indicate to include poll.h rather than sys/poll.h.
So, let's use poll.h.

Similar to 8139906eaa.
Follow-up for 0fc45c8d20.
2025-07-19 09:43:40 +02:00
Luca Boccassi
467b1c4e4b core: gracefully ignore PrivateBPF=yes if the kernel does not support it (#38238)
Fixes #38225.
2025-07-18 23:36:24 +01:00
Yaping Li
2e5e17a570 test-web-util.c: Migrate to new assertion MACROs
We recently added a new set of assertion macros such as ASSERT_GE, ASSERT_OK, ASSERT_EQ, ... which show not
only the expression that failed but also the values of the arguments of the expression. Let's use them.
2025-07-18 20:00:40 +01:00
Yu Watanabe
a673826003 TEST-07-PID1: check if PrivateBPF=yes is gracefully ignored 2025-07-18 20:25:42 +09:00
Yu Watanabe
8abdceac77 TEST-07-PID1: fix negative check 2025-07-18 20:25:42 +09:00
Yu Watanabe
f1eed4e592 test-bpf-token: use test macros and functions
No functional change, just refactoring.
2025-07-18 20:25:42 +09:00
Yu Watanabe
0e8e655c52 core/namespace: gracefully handle errors in mounting new bpffs instance
Then, fallback to remount /sys/fs/bpf read-only when ProtectKernelTunables=yes.
2025-07-18 20:25:35 +09:00
Luca Boccassi
042138fbe7 readme: update ubuntu autopkgtest infra support channels
ubuntu is moving away from IRC
2025-07-18 12:15:46 +01:00
Yu Watanabe
9eabf82750 core: it is not necessary to send message after fsconfig() for bpffs
Instead, let's wait for the helper process being finished.
2025-07-18 20:15:25 +09:00
Yu Watanabe
8509ceea10 core/exec-invoke: negative errno needs to be passed to report_errno_and_exit()
Hence, we cannot pass errno as is to report_errno_and_exit().

This splits out bpffs_helper(), which returns negative errno on failure,
and 0 on success. And make the returned value passed to report_errno_and_exit().

Follow-up for #36134.
2025-07-18 20:15:20 +09:00
Zbigniew Jędrzejewski-Szmek
43419435c6 resolved: Implement continuous mDNS querying as per RFC6762 5.2 (#22532)
Allow for mDNS service/domain/types browsing.
A client can connect to the backend via varlink and receive updates as
the requested service becomes available.

The interval between the first two queries MUST be at least one second,
the intervals between successive queries MUST increase by at least a
factor of two.
When the interval between queries reaches or exceeds 60 minutes, a
querier MAY cap the interval to a maximum of 60 minutes, and perform
subsequent queries at a steady-state rate of one query per hour.

Cache maintenance performed by issuing queries at 80, 85, 90, 95% of the
TTL, and updating/removing the records depending on replies.

TODO:
Improve the DNS transaction logic when multiple clients subscribe to the
same service, ensuring that continuous queries are optimized.














































































































































































<!-- devel-freezer =
{"comment-id":"1625154850","freezing-tag":"v256-rc2"} -->
2025-07-18 12:54:33 +02:00
Yu Watanabe
58788345d9 journald: several follow-ups for reloading journald.conf (#38199)
Follow-ups for df5b3426f6 (#36742).
2025-07-18 18:31:18 +09:00
Yu Watanabe
f724d51dd2 journal-file: drop unused journal_file_reload()
This partially reverts df5b3426f6.
2025-07-18 15:27:37 +09:00
Yu Watanabe
922d037f34 journald-manager: rework reopening journal files on reload
Previous implementations had several issues:
- user journals were not updated,
- transition from volatile -> persistent storage transition was not
  handled.

Let's make all journal files closed when at least one journal file
related configurations are changed, and reopen necessary journals with
requested settings.
2025-07-18 15:27:37 +09:00
Yu Watanabe
a09dc6e5fe journal-file: introduce journal_metrics_equal()
Currently not used, but will be used later.
2025-07-18 15:27:37 +09:00
Yu Watanabe
7b1f842d44 journald-context: update ratelimit interval and burst on reload 2025-07-18 15:27:37 +09:00
Yu Watanabe
c029cb45a8 journald-config: ForwardToSocket= is not supported in non-default namespace instance 2025-07-18 15:27:37 +09:00
Yu Watanabe
20f23d13b4 journald-socket: close previous socket when ForwardToSocket= is changed on reload 2025-07-18 15:27:37 +09:00
Yu Watanabe
cbf59f4bb2 journald-audit: apply new Audit= setting on reload 2025-07-18 15:27:37 +09:00
Yu Watanabe
884274cbe6 journald-audit: make enable_audit() take Manager object
And rename it to manager_set_kernel_audit(), and make it log failures.
2025-07-18 15:27:37 +09:00
Yu Watanabe
63e990308f journald-kmsg: merge manager_kmsg_mode() into manager_open_dev_kmsg()
As it is now only used by the function.
2025-07-18 15:27:37 +09:00
Yu Watanabe
7bc133fe56 journald-kmsg: fix reopening /dev/kmsg
The previous logic was completely broken:
- the access mode comparison is broken,
- flushing kmsg did not work, as the configuration is already disabled,
- seqnum file is not opened when previously disabled,
- failure in reopening /dev/kmsg should not be critical.

This fixes the above issues.
2025-07-18 15:27:37 +09:00
Yu Watanabe
1416a3df43 journald: introduce manager_unlink_seqnum_file()
Currently unused, but will be used later.
2025-07-18 15:27:37 +09:00
Yu Watanabe
059efb97e3 journald-kmsg: introduce manager_close_kernel_seqnum() helper function 2025-07-18 15:27:37 +09:00
Yu Watanabe
61b1f7d2d3 journald-kmsg: shorten manager_flush_dev_kmsg() a bit 2025-07-18 15:27:37 +09:00
Yu Watanabe
f1bd0007c0 journald: rename fuzz-journald.[ch] -> fuzz-journald-util.[ch] 2025-07-18 15:27:37 +09:00
Yu Watanabe
32bd43d768 journald: do not read configs by journald fuzzers 2025-07-18 15:27:37 +09:00
Yu Watanabe
f48cf2a96d journald: move all config entries from Manager to JournalConfig
Previously, only config entries controlled by multiple sources were located in
JournalConfig, and still other config entries were in Manager.
That's hard to maintain. Let's move all config entries to JournalConfig.

This also makes JournalConfig.forward_to_kmsg and friends tristate.
Otherwise, even if a higher precedence config source disables the
feature, it may be enabled by a lower precedence config.
2025-07-18 15:27:35 +09:00
Yu Watanabe
9f819a7791 journald-config: modernize config_parse_line_max() and config_parse_forward_to_socket()
No functional change, just refactoring.
2025-07-18 15:27:03 +09:00
Yu Watanabe
208c9cf988 journald-config: always clear threshold_bytes even when boolean value is specified
Otherwise, previously specified threshold may not be cleared.
2025-07-18 15:27:03 +09:00
Yu Watanabe
d13a471c45 journald-config: make kernel command line parser take JournalConfig 2025-07-18 15:27:03 +09:00
Yu Watanabe
5b585edd2f journald-config: use char* for credential data
This also slightly update log messages, and make
manager_load_credentials() take JournalConfig.
No functional change, just refactoring.
2025-07-18 15:27:03 +09:00
Yu Watanabe
3941032c6c journald-audit: do not control kernel auditing by non-default namespace instances by default
The kernel (thus system-wide) auditing should not be controlled by
non-default namespace instances, unless explicitly requested.
2025-07-18 15:27:03 +09:00
Yu Watanabe
31b25d4290 journald-manager: use manager_get_file_flags() more
This also adds one missing assertion and drop spurious empty line.
No functional change, just refactoring.
2025-07-18 15:27:03 +09:00
Yu Watanabe
a322e43ba9 journald-manager: make manager_get_file_flags() return JournalFileFlags
This also adds a missing assertion.
2025-07-18 15:26:44 +09:00