]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agoTEST-07-PID1: add test case for #38320 38323/head
Mike Yuan [Thu, 24 Jul 2025 14:29:41 +0000 (16:29 +0200)] 
TEST-07-PID1: add test case for #38320

3 months agocore/dbus-manager: validate unit type before calling into service-specific methods
Mike Yuan [Thu, 24 Jul 2025 13:55:29 +0000 (15:55 +0200)] 
core/dbus-manager: validate unit type before calling into service-specific methods

Fixes #38320

3 months agocore/dbus-manager: don't ever try to dump fdstore for units not properly loaded
Mike Yuan [Thu, 24 Jul 2025 14:07:28 +0000 (16:07 +0200)] 
core/dbus-manager: don't ever try to dump fdstore for units not properly loaded

3 months agotest-memstream-util.c: Migrate to new assertion macros
Yaping Li [Wed, 23 Jul 2025 21:16:03 +0000 (14:16 -0700)] 
test-memstream-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.

3 months agoLICENSES/README: update file paths after moves
Luca Boccassi [Thu, 24 Jul 2025 11:20:26 +0000 (12:20 +0100)] 
LICENSES/README: update file paths after moves

Follow-up for 1a60b97524d8408e5f059b09ae316987c698e671

3 months agoFix typos found by Lintian
Luca Boccassi [Thu, 24 Jul 2025 08:00:25 +0000 (09:00 +0100)] 
Fix typos found by Lintian

3 months agoNEWS: add description for DHCPv6 SIP feature
Zbigniew Jędrzejewski-Szmek [Thu, 24 Jul 2025 06:53:19 +0000 (08:53 +0200)] 
NEWS: add description for DHCPv6 SIP feature

Also move the description of IPv4DuplicateAddressDetectionTimeoutSec=
to the section about systemd-networkd. The change of the timeout doesn't
have to be described as "incompatible". It's more of a bugfix, the previous
timeout was just strangely large and hopefully nobody relied on this detail
of implementation.

Also, reword to say that MPLSRouting= just controls enablement, nothing more.

3 months agoNEWS: some typos and whitespace fixes
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 21:05:16 +0000 (23:05 +0200)] 
NEWS: some typos and whitespace fixes

3 months agotest-unit-serialize.c: Migrate to new assertion macros
Yaping Li [Wed, 23 Jul 2025 00:30:35 +0000 (17:30 -0700)] 
test-unit-serialize.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.

3 months agomeson: Detect ELF ABI version for bpf build on ppc64 (#38307)
Cosima Neidahl [Wed, 23 Jul 2025 20:42:13 +0000 (22:42 +0200)] 
meson: Detect ELF ABI version for bpf build on ppc64 (#38307)

On 64-bit POWER, there are multiple versions of the ELF ABI in use.

- little-endian powerpc64 is ELFv2
- big-endian powerpc64 is
  - ELFv2 when using musl
  - either ELFv1 or ELFv2 when using glibc

Previously, the BPF build was hard-coding `-D_CALL_ELF=2`, which is
ELFv2. This makes the build fail on ELFv1, similarly to the original
issue that necessitated the addition of this flag on powerpc64le.

To fix this:

1. Use ELFv1 as the default (when `_CALL_ELF` is not defined, this is
the assumption that should be made about the ABI version).
2. Check if the C compiler has `_CALL_ELF` defined, and if it does,
override the default with that.
That's technically not the *correct* compiler in this situation, but I'm
unsure how to get a compiler object for the BPF one from Meson to do the
`*_define('_CALL_ELF')` checks with, and they *should* both be targeting
the same ABI version anyway.
3. Add the ABI version to the `_CALL_ELF` definition for the BPF
compiler flags.

This makes a BPF-enabled build succeed on powerpc64 w/ ELFv1 glibc.

3 months agopo: update Japanese translations
Yu Watanabe [Wed, 23 Jul 2025 17:29:57 +0000 (02:29 +0900)] 
po: update Japanese translations

3 months agopo: Update translation files
Weblate [Wed, 23 Jul 2025 16:54:47 +0000 (16:54 +0000)] 
po: Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/
Translation: systemd/main

3 months agoRevert "po: update Japanese translations"
Yu Watanabe [Wed, 23 Jul 2025 17:58:07 +0000 (02:58 +0900)] 
Revert "po: update Japanese translations"

This reverts commit 59af98ab204aa6381c0c592cd0d14f8c604647e6.

The commit conflicts with Weblate's one. Tentatively revert the commit to
resolve the conflict.

3 months agopo: update Japanese translations
Yu Watanabe [Wed, 23 Jul 2025 17:29:57 +0000 (02:29 +0900)] 
po: update Japanese translations

3 months agoChores for RC1 (#38300) v258-rc1
Luca Boccassi [Wed, 23 Jul 2025 16:54:25 +0000 (17:54 +0100)] 
Chores for RC1 (#38300)

3 months agoFix Positivo K116J search key and www shortcut
luc-salles [Wed, 23 Jul 2025 15:30:26 +0000 (11:30 -0400)] 
Fix Positivo K116J search key and www shortcut

3 months agonetwork: several follow-ups for recent changes (#38298)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 15:16:17 +0000 (17:16 +0200)] 
network: several follow-ups for recent changes (#38298)

3 months agomeson: update version numbers for v258~rc1 38300/head
Luca Boccassi [Wed, 23 Jul 2025 13:33:35 +0000 (14:33 +0100)] 
meson: update version numbers for v258~rc1

3 months agopo: update systemd-pot
Luca Boccassi [Wed, 23 Jul 2025 14:39:17 +0000 (15:39 +0100)] 
po: update systemd-pot

ninja -C build systemd-pot

3 months agohwdb: update
Luca Boccassi [Wed, 23 Jul 2025 13:27:38 +0000 (14:27 +0100)] 
hwdb: update

ninja -C build update-hwdb

3 months agoNEWS: add time/place
Luca Boccassi [Wed, 23 Jul 2025 13:32:09 +0000 (14:32 +0100)] 
NEWS: add time/place

3 months agoNEWS: update contributors list
Luca Boccassi [Wed, 23 Jul 2025 13:25:25 +0000 (14:25 +0100)] 
NEWS: update contributors list

3 months agonetwork/state-file: coding style fixlet 38298/head
Yu Watanabe [Wed, 23 Jul 2025 13:21:31 +0000 (22:21 +0900)] 
network/state-file: coding style fixlet

Follow-up for 168ad243cc7d5632e24dfc75f28d8e25c2076f83.

3 months agonetwork/state-file: ignore any errors in sd_dhcp6_lease_get_dnr()
Yu Watanabe [Wed, 23 Jul 2025 13:21:03 +0000 (22:21 +0900)] 
network/state-file: ignore any errors in sd_dhcp6_lease_get_dnr()

Follow-up for 168ad243cc7d5632e24dfc75f28d8e25c2076f83.

For consistency with other places.

3 months agonetwork/json: ignore -ENODATA and any failures from sd_dhcp_lease_get_sip()
Yu Watanabe [Wed, 23 Jul 2025 13:18:17 +0000 (22:18 +0900)] 
network/json: ignore -ENODATA and any failures from sd_dhcp_lease_get_sip()

Addresses https://github.com/systemd/systemd/pull/38269#discussion_r2225375899.

Follow-up for 238c427aa9c4bc28c1840e550551a984b33d44da.

3 months agoNEWS: fix wrong path for sd-stub global extensions directory
Luca Boccassi [Wed, 23 Jul 2025 13:22:08 +0000 (14:22 +0100)] 
NEWS: fix wrong path for sd-stub global extensions directory

3 months agostub: check if security override is available before using it (#38295)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 13:16:01 +0000 (15:16 +0200)] 
stub: check if security override is available before using it (#38295)

Avoids fallback that requires it if it is not available. Can be dropped
once support for shim < 16 is no longer needed

Follow-up for 23d56ae890f8e7c8e29ef51e05494e445725d3ff

3 months agoNEWS: add new entries
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 13:10:56 +0000 (15:10 +0200)] 
NEWS: add new entries

The section for systemd-vmspawn is grouped with systemd-nspawn
and systemd-machined, and systemd-analyze gets a new section of
its own.

3 months agoNEWS: adjust style
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 13:10:01 +0000 (15:10 +0200)] 
NEWS: adjust style

For meson options, say '-Dfoo=' to make them visually different.
Adjust grammar and punctuation in various places.
Break very long lines where feasible.

3 months agomeson: crypt.h must always exist
Yu Watanabe [Wed, 23 Jul 2025 04:13:29 +0000 (13:13 +0900)] 
meson: crypt.h must always exist

We require at least crypt_r() exists, and it is provided since glibc-2.0
(and dropped in glibc-2.39) or by libxcrypt, and the function is
provided in crypt.h regardless it is provided by glibc or libxcrypt.
Hence, we cannot fallback to unistd.h.

This makes the condition about crypt.h more strict, and stop compilation
earlier when crypt.h does not exist.

3 months agonetworkctl-config-file: validate args are valid filenames
Mike Yuan [Wed, 23 Jul 2025 08:30:18 +0000 (10:30 +0200)] 
networkctl-config-file: validate args are valid filenames

... as opposed to full paths

Fixes #38288

3 months agostub: check if security override is available before using it 38295/head
Luca Boccassi [Wed, 23 Jul 2025 09:11:34 +0000 (10:11 +0100)] 
stub: check if security override is available before using it

Avoids fallback that requires it if it is not available. Can
be dropped once support for shim < 16 is no longer needed

Follow-up for 23d56ae890f8e7c8e29ef51e05494e445725d3ff

3 months agotree-wide: several fixlets for log message and comment (#38263)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 08:17:33 +0000 (10:17 +0200)] 
tree-wide: several fixlets for log message and comment (#38263)

3 months agogetty-generator: fine-grained execution control (#38258)
Zbigniew Jędrzejewski-Szmek [Wed, 23 Jul 2025 07:58:27 +0000 (09:58 +0200)] 
getty-generator: fine-grained execution control (#38258)

Closes #37928.

3 months agostub: restore compatibility for shim (< 16.0) -> UKI case
Luca Boccassi [Mon, 14 Jul 2025 23:52:01 +0000 (00:52 +0100)] 
stub: restore compatibility for shim (< 16.0) -> UKI case

It is possible to boot directly a UKI from shim, and Fedora Cloud Base UKI
does exactly this.
This used to work fine until https://github.com/systemd/systemd/pull/37372
which broke compatibility when shim < 16.0 (no loader protocol override) is
used. Shim 15.8 is still in use in several distributions, and will be for
a long time.

Restore a part of the previous implementation, and if running with secure
boot enabled, and with shim but < 16.0, apply a security override.

Follow-up for cab9c7b5a42effa8a45611fc6b8556138c869b5f

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

3 months agotest-user-record.c: Migrate to new assertion MACROs
Yaping Li [Tue, 22 Jul 2025 22:23:48 +0000 (15:23 -0700)] 
test-user-record.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.

3 months agotest-web-util.c: Use ASSERT_FALSE() instead of ASSERT_TRUE() where appropriate
Yaping Li [Tue, 22 Jul 2025 21:20:14 +0000 (14:20 -0700)] 
test-web-util.c: Use ASSERT_FALSE() instead of ASSERT_TRUE() where appropriate

3 months agomeson: prepend sys_root to bpf isystem
James Hilliard [Mon, 21 Jul 2025 19:04:49 +0000 (13:04 -0600)] 
meson: prepend sys_root to bpf isystem

These sort of absolute include paths are generally unsafe when cross compiling.

3 months agoTEST-81-GENERATORS: add test cases for systemd.getty_auto=console and friends 38258/head
Yu Watanabe [Fri, 18 Jul 2025 17:10:15 +0000 (02:10 +0900)] 
TEST-81-GENERATORS: add test cases for systemd.getty_auto=console and friends

3 months agogetty-generator: add support for fine-grained control of execution modes
Allison Karlitskaya [Tue, 24 Jun 2025 08:15:14 +0000 (10:15 +0200)] 
getty-generator: add support for fine-grained control of execution modes

This makes the systemd.getty_auto= kernel command line option and the
$SYSTEMD_GETTY_AUTO environment variable takes the list of classes of
services: credential, container, console, builtin.

This also add getty.auto credential that can take the same value as the
kernel command line option.

Closes #37928.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
3 months agogetty-generator: show original path in the log message
Yu Watanabe [Fri, 18 Jul 2025 17:55:01 +0000 (02:55 +0900)] 
getty-generator: show original path in the log message

This fixes the following log message:
Before:
```
Invalid container tty device specified, ignoring: (null)
```
After:
```
Invalid container tty device specified, ignoring: /dev/tty0
```

If a non-pts device path is passed to add_container_getty(), we call
add_getty_impl() with NULL tty, so previously (null) was logged.
Let's log the original path when an invalid tty is specified.

3 months agonetworkd/dhcp6: Add support for IPv6 SIP servers (#38269)
Yu Watanabe [Tue, 22 Jul 2025 23:09:06 +0000 (08:09 +0900)] 
networkd/dhcp6: Add support for IPv6 SIP servers (#38269)

This pull-request adds support for IPv6 SIP servers, which can be
obtained from DHCPv6 options.

[RFC3319](https://www.rfc-editor.org/rfc/rfc3319.html) defines two
options for this: option 21 (SIP Servers Domain Name List) and option 22
(SIP Servers IPv6 Address List).

systemd-networkd currently only supports IPv4 SIP servers, but ISPs like
NTT EAST provide IPv6 SIP servers. Exposing this in the D-Bus API would
allow other programs, such as downstream DHCPv6 servers, to utilize it.

Usage:

```
[DHCPv6]
UseSIP=yes
```

Partial output of `run0 systemd-networkd-tests.py
NetworkdDHCPClientTests.test_dhcp_client_use_sip`:

```console
> networkctl status veth99
● 17: veth99
                 NetDev File: /run/systemd/network/25-veth.netdev
                   Link File: /usr/lib/systemd/network/99-default.link
                Network File: /run/systemd/network/25-dhcp-client.network
                              └─/run/systemd/network/25-dhcp-client.network.d/override.conf
                       State: routable (configured)
                Online state: online
                        Type: ether
                        Kind: veth
                      Driver: veth
            Hardware Address: 12:34:56:78:9a:bc
                         MTU: 1500 (min: 68, max: 65535)
                       QDisc: noqueue
IPv6 Address Generation Mode: eui64
    Number of Queues (Tx/Rx): 2/2
            Auto negotiation: no
                       Speed: 10Gbps
                      Duplex: full
                        Port: tp
                     Address: 192.168.5.181 (DHCPv4 via 192.168.5.1)
                              2600::15
                              fe80::1034:56ff:fe78:9abc
                     Gateway: 192.168.5.1
                              fe80::1034:56ff:fe78:9abd
                         SIP: 192.168.5.1
                              2600::1
                              foo.example.com
           Activation Policy: up
         Required For Online: yes
            DHCPv4 Client ID: IAID:0x7ec6b6c/DUID
          DHCPv6 Client IAID: 0x7ec6b6c
          DHCPv6 Client DUID: DUID-EN/Vendor:0000ab11617740de1342c3a2
```

3 months agodocs: fix SurviveFinalKillSignal typo
Nick Owens [Tue, 22 Jul 2025 16:59:47 +0000 (09:59 -0700)] 
docs: fix SurviveFinalKillSignal typo

3 months agodocs: mention LoaderTpm2ActivePcrBanks in BLI
Luca Boccassi [Fri, 18 Jul 2025 22:13:35 +0000 (23:13 +0100)] 
docs: mention LoaderTpm2ActivePcrBanks in BLI

Follow-up for 6eab4cd44c3c43698dcfc2c3bc8cd31ed610a812

3 months agounits/ssh-access.target: enable StopWhenUnneeded=
Mike Yuan [Sat, 19 Jul 2025 09:11:31 +0000 (11:11 +0200)] 
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.

3 months agoUpdate USER_RECORD.md (#38283)
Philip Freeman [Tue, 22 Jul 2025 09:27:37 +0000 (02:27 -0700)] 
Update USER_RECORD.md (#38283)

trailing comma here is invalid json.

3 months agotest-network: add test cases for SIP servers 38269/head
haxibami [Tue, 22 Jul 2025 08:06:11 +0000 (17:06 +0900)] 
test-network: add test cases for SIP servers

3 months agonetwork/dhcp6: add SIP server support
haxibami [Tue, 22 Jul 2025 08:05:13 +0000 (17:05 +0900)] 
network/dhcp6: add SIP server support

3 months agosd-dhcp6-client: add SIP server domain support
haxibami [Tue, 22 Jul 2025 07:36:53 +0000 (16:36 +0900)] 
sd-dhcp6-client: add SIP server domain support

3 months agosd-dhcp6-client: add SIP server address support
haxibami [Tue, 22 Jul 2025 07:31:52 +0000 (16:31 +0900)] 
sd-dhcp6-client: add SIP server address support

3 months agovarlink-idl: fix type of ProcessId.bootId
Yu Watanabe [Mon, 21 Jul 2025 19:26:07 +0000 (04:26 +0900)] 
varlink-idl: fix type of ProcessId.bootId

Fixes a bug in 0fc530d15709a4b531412fdadf3cfb5d0433b62f (v257).
Fixes #38276.

3 months agoci/build-test: install libarchive-dev
Yu Watanabe [Sun, 20 Jul 2025 00:48:08 +0000 (09:48 +0900)] 
ci/build-test: install libarchive-dev

Previously, the package was not installed, hence the feature was always
disabled in the build test.

3 months agotest: missing -v option for command
Yu Watanabe [Sun, 20 Jul 2025 00:32:14 +0000 (09:32 +0900)] 
test: missing -v option for command

Otherwise the specified command is invoked, not only checking the
existence of the command.

3 months agotest-sd-device: also exclude dm block devices
Yu Watanabe [Mon, 21 Jul 2025 19:35:25 +0000 (04:35 +0900)] 
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.

3 months agotree-wide: add missing '=' in short comments for function argument 38263/head
Yu Watanabe [Sat, 19 Jul 2025 00:47:33 +0000 (09:47 +0900)] 
tree-wide: add missing '=' in short comments for function argument

3 months agotree-wide: do not use %m with SYNTHETIC_ERRNO()
Yu Watanabe [Sat, 19 Jul 2025 00:45:29 +0000 (09:45 +0900)] 
tree-wide: do not use %m with SYNTHETIC_ERRNO()

3 months agotree-wide: normalize usage of %m
Yu Watanabe [Sat, 19 Jul 2025 00:19:09 +0000 (09:19 +0900)] 
tree-wide: normalize usage of %m

3 months agotree-wide: fix log messages: "Failed VERB" -> "Failed to VERB"
Yu Watanabe [Sat, 19 Jul 2025 00:02:02 +0000 (09:02 +0900)] 
tree-wide: fix log messages: "Failed VERB" -> "Failed to VERB"

3 months agosd-dhcp6-lease: fix calculation of t2
Beniamino Galvani [Mon, 21 Jul 2025 12:24:27 +0000 (14:24 +0200)] 
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: 394fac52d0e7 ("sd-dhcp6-client: introduce sd_dhcp6_lease_get_t1() and friends")
3 months agobootctl: do not fail when the same file is updated multiple times
Yu Watanabe [Wed, 19 Jun 2024 07:11:23 +0000 (16:11 +0900)] 
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 929f41c6528fb630753d4e2f588a8eb6c2f6a609.
Fixes #33392.

3 months agosd-event: fix infinite loop in inotify event handling (#38268)
Mike Yuan [Mon, 21 Jul 2025 08:14:58 +0000 (10:14 +0200)] 
sd-event: fix infinite loop in inotify event handling (#38268)

Fixes #38265.

3 months agotest: add test case for issue #38265 38268/head
Yu Watanabe [Sat, 19 Jul 2025 16:27:10 +0000 (01:27 +0900)] 
test: add test case for issue #38265

3 months agosd-event: drop inotify event from buffer when no event source is triggered
Yu Watanabe [Sat, 19 Jul 2025 17:12:00 +0000 (02:12 +0900)] 
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.

3 months agocore/service: drop job done messages identical to generic ones
Mike Yuan [Sat, 19 Jul 2025 12:55:37 +0000 (14:55 +0200)] 
core/service: drop job done messages identical to generic ones

Prompted by #38263

3 months agotest: add test case for getenv_for_pid()
Yu Watanabe [Fri, 18 Jul 2025 18:21:10 +0000 (03:21 +0900)] 
test: add test case for getenv_for_pid()

3 months agovmspawn: use poll.h rather than sys/poll.h
Yu Watanabe [Sat, 19 Jul 2025 02:58:20 +0000 (11:58 +0900)] 
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 8139906eaaced08d7924abf012561a5e8e9fbf2a.
Follow-up for 0fc45c8d20ad46ab9be0d8f29b16e606e0dd44ca.

3 months agocore: gracefully ignore PrivateBPF=yes if the kernel does not support it (#38238)
Luca Boccassi [Fri, 18 Jul 2025 22:36:24 +0000 (23:36 +0100)] 
core: gracefully ignore PrivateBPF=yes if the kernel does not support it (#38238)

Fixes #38225.

3 months agotest-web-util.c: Migrate to new assertion MACROs
Yaping Li [Thu, 17 Jul 2025 01:48:58 +0000 (18:48 -0700)] 
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.

3 months agoTEST-07-PID1: check if PrivateBPF=yes is gracefully ignored 38238/head
Yu Watanabe [Wed, 16 Jul 2025 00:41:50 +0000 (09:41 +0900)] 
TEST-07-PID1: check if PrivateBPF=yes is gracefully ignored

3 months agoTEST-07-PID1: fix negative check
Yu Watanabe [Wed, 16 Jul 2025 13:45:04 +0000 (22:45 +0900)] 
TEST-07-PID1: fix negative check

3 months agotest-bpf-token: use test macros and functions
Yu Watanabe [Tue, 15 Jul 2025 23:49:52 +0000 (08:49 +0900)] 
test-bpf-token: use test macros and functions

No functional change, just refactoring.

3 months agocore/namespace: gracefully handle errors in mounting new bpffs instance
Yu Watanabe [Thu, 17 Jul 2025 19:34:22 +0000 (04:34 +0900)] 
core/namespace: gracefully handle errors in mounting new bpffs instance

Then, fallback to remount /sys/fs/bpf read-only when ProtectKernelTunables=yes.

3 months agoreadme: update ubuntu autopkgtest infra support channels
Luca Boccassi [Fri, 18 Jul 2025 11:14:38 +0000 (12:14 +0100)] 
readme: update ubuntu autopkgtest infra support channels

ubuntu is moving away from IRC

3 months agocore: it is not necessary to send message after fsconfig() for bpffs
Yu Watanabe [Thu, 17 Jul 2025 18:53:28 +0000 (03:53 +0900)] 
core: it is not necessary to send message after fsconfig() for bpffs

Instead, let's wait for the helper process being finished.

3 months agocore/exec-invoke: negative errno needs to be passed to report_errno_and_exit()
Yu Watanabe [Fri, 18 Jul 2025 06:17:24 +0000 (15:17 +0900)] 
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.

3 months agoresolved: Implement continuous mDNS querying as per RFC6762 5.2 (#22532)
Zbigniew Jędrzejewski-Szmek [Fri, 18 Jul 2025 10:54:33 +0000 (12:54 +0200)] 
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"} -->

3 months agojournald: several follow-ups for reloading journald.conf (#38199)
Yu Watanabe [Fri, 18 Jul 2025 09:31:18 +0000 (18:31 +0900)] 
journald: several follow-ups for reloading journald.conf (#38199)

Follow-ups for df5b3426f60bb626f46f93fbdacecae274c1645b (#36742).

3 months agojournal-file: drop unused journal_file_reload() 38199/head
Yu Watanabe [Tue, 15 Jul 2025 19:33:54 +0000 (04:33 +0900)] 
journal-file: drop unused journal_file_reload()

This partially reverts df5b3426f60bb626f46f93fbdacecae274c1645b.

3 months agojournald-manager: rework reopening journal files on reload
Yu Watanabe [Tue, 15 Jul 2025 17:55:55 +0000 (02:55 +0900)] 
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.

3 months agojournal-file: introduce journal_metrics_equal()
Yu Watanabe [Tue, 15 Jul 2025 18:24:23 +0000 (03:24 +0900)] 
journal-file: introduce journal_metrics_equal()

Currently not used, but will be used later.

3 months agojournald-context: update ratelimit interval and burst on reload
Yu Watanabe [Tue, 15 Jul 2025 17:22:53 +0000 (02:22 +0900)] 
journald-context: update ratelimit interval and burst on reload

3 months agojournald-config: ForwardToSocket= is not supported in non-default namespace instance
Yu Watanabe [Tue, 15 Jul 2025 16:56:45 +0000 (01:56 +0900)] 
journald-config: ForwardToSocket= is not supported in non-default namespace instance

3 months agojournald-socket: close previous socket when ForwardToSocket= is changed on reload
Yu Watanabe [Tue, 15 Jul 2025 16:42:26 +0000 (01:42 +0900)] 
journald-socket: close previous socket when ForwardToSocket= is changed on reload

3 months agojournald-audit: apply new Audit= setting on reload
Yu Watanabe [Tue, 15 Jul 2025 16:24:32 +0000 (01:24 +0900)] 
journald-audit: apply new Audit= setting on reload

3 months agojournald-audit: make enable_audit() take Manager object
Yu Watanabe [Tue, 15 Jul 2025 16:20:36 +0000 (01:20 +0900)] 
journald-audit: make enable_audit() take Manager object

And rename it to manager_set_kernel_audit(), and make it log failures.

3 months agojournald-kmsg: merge manager_kmsg_mode() into manager_open_dev_kmsg()
Yu Watanabe [Tue, 15 Jul 2025 15:56:10 +0000 (00:56 +0900)] 
journald-kmsg: merge manager_kmsg_mode() into manager_open_dev_kmsg()

As it is now only used by the function.

3 months agojournald-kmsg: fix reopening /dev/kmsg
Yu Watanabe [Sun, 13 Jul 2025 14:24:08 +0000 (23:24 +0900)] 
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.

3 months agojournald: introduce manager_unlink_seqnum_file()
Yu Watanabe [Tue, 15 Jul 2025 16:01:06 +0000 (01:01 +0900)] 
journald: introduce manager_unlink_seqnum_file()

Currently unused, but will be used later.

3 months agojournald-kmsg: introduce manager_close_kernel_seqnum() helper function
Yu Watanabe [Tue, 15 Jul 2025 15:24:17 +0000 (00:24 +0900)] 
journald-kmsg: introduce manager_close_kernel_seqnum() helper function

3 months agojournald-kmsg: shorten manager_flush_dev_kmsg() a bit
Yu Watanabe [Sun, 13 Jul 2025 14:23:20 +0000 (23:23 +0900)] 
journald-kmsg: shorten manager_flush_dev_kmsg() a bit

3 months agojournald: rename fuzz-journald.[ch] -> fuzz-journald-util.[ch]
Yu Watanabe [Sun, 13 Jul 2025 08:26:29 +0000 (17:26 +0900)] 
journald: rename fuzz-journald.[ch] -> fuzz-journald-util.[ch]

3 months agojournald: do not read configs by journald fuzzers
Yu Watanabe [Sun, 13 Jul 2025 08:19:46 +0000 (17:19 +0900)] 
journald: do not read configs by journald fuzzers

3 months agojournald: move all config entries from Manager to JournalConfig
Yu Watanabe [Sun, 13 Jul 2025 06:29:22 +0000 (15:29 +0900)] 
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.

3 months agojournald-config: modernize config_parse_line_max() and config_parse_forward_to_socket()
Yu Watanabe [Sun, 13 Jul 2025 06:28:52 +0000 (15:28 +0900)] 
journald-config: modernize config_parse_line_max() and config_parse_forward_to_socket()

No functional change, just refactoring.

3 months agojournald-config: always clear threshold_bytes even when boolean value is specified
Yu Watanabe [Sun, 13 Jul 2025 03:41:43 +0000 (12:41 +0900)] 
journald-config: always clear threshold_bytes even when boolean value is specified

Otherwise, previously specified threshold may not be cleared.

3 months agojournald-config: make kernel command line parser take JournalConfig
Yu Watanabe [Sun, 13 Jul 2025 05:37:57 +0000 (14:37 +0900)] 
journald-config: make kernel command line parser take JournalConfig

3 months agojournald-config: use char* for credential data
Yu Watanabe [Sun, 13 Jul 2025 05:16:55 +0000 (14:16 +0900)] 
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.

3 months agojournald-audit: do not control kernel auditing by non-default namespace instances...
Yu Watanabe [Sun, 13 Jul 2025 06:21:50 +0000 (15:21 +0900)] 
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.

3 months agojournald-manager: use manager_get_file_flags() more
Yu Watanabe [Sun, 13 Jul 2025 07:17:12 +0000 (16:17 +0900)] 
journald-manager: use manager_get_file_flags() more

This also adds one missing assertion and drop spurious empty line.
No functional change, just refactoring.

3 months agojournald-manager: make manager_get_file_flags() return JournalFileFlags
Yu Watanabe [Sun, 13 Jul 2025 07:21:26 +0000 (16:21 +0900)] 
journald-manager: make manager_get_file_flags() return JournalFileFlags

This also adds a missing assertion.