]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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.

3 months agojournald: move several configuration related definitions to journald-config.[ch]
Yu Watanabe [Sun, 13 Jul 2025 02:46:46 +0000 (11:46 +0900)] 
journald: move several configuration related definitions to journald-config.[ch]

No functional change, just refactoring and preparation for later changes.

3 months agoSmall comment fixes (#38252)
Luca Boccassi [Thu, 17 Jul 2025 21:56:28 +0000 (22:56 +0100)] 
Small comment fixes (#38252)

3 months agoanalyze: several follow-ups for recent changes (#38253)
Luca Boccassi [Thu, 17 Jul 2025 19:10:47 +0000 (20:10 +0100)] 
analyze: several follow-ups for recent changes (#38253)

Follow-ups for 9a08000d186396bc8bcb8fe057720417543c3bf0 (#37838) and
ad6e02e7b42db35178305614e643be7a62568d87 (#38132).

3 months agobasic/socket-util: reserve more space for timeval/timespec messages
Zbigniew Jędrzejewski-Szmek [Thu, 17 Jul 2025 14:35:01 +0000 (16:35 +0200)] 
basic/socket-util: reserve more space for timeval/timespec messages

As reported in https://github.com/systemd/systemd/issues/38222, we get the
buffer size calculation wrong on 32-bit arm. The reporter suggested checking if
__TIMESIZE == 64, but I think it's better to just use the bigger size in all
cases. The code to guesstimate the buffer size was already tweaked a few times
and apparently it's not easy to get it right. Systemd and glibc might be
compiled with different combinations of __TIMESIZE, so the compile-time check
is not super reliable, and by using the bigger size, we don't depend on the
details of how glibc decided whether to duplicate the struct or not. The cost
is negligible, 16 bytes on stack, so let's do the easy and robust thing.

Solution based on the suggestion by UZver24.

While at it, drop the mock struct definitions. They are only used to calculate
the size, but since the types involved are 8-bit values, there are no alignment
issues and we can just calculate the size directly.

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

3 months agobash-completion/analyze: show candidates for --debugger 38253/head
Yu Watanabe [Thu, 17 Jul 2025 16:44:25 +0000 (01:44 +0900)] 
bash-completion/analyze: show candidates for --debugger

This also adds missing completion for --debugger-arguments.

Follow-up for ad6e02e7b42db35178305614e643be7a62568d87.

3 months agoanalyze-unit-gdb: append debugger arguments
Yu Watanabe [Thu, 17 Jul 2025 16:29:59 +0000 (01:29 +0900)] 
analyze-unit-gdb: append debugger arguments

Previously, the --debugger-arguments= was ignored.

Follow-up for ad6e02e7b42db35178305614e643be7a62568d87.

3 months agoanalyze: merge if branches on debugger
Yu Watanabe [Thu, 17 Jul 2025 16:29:05 +0000 (01:29 +0900)] 
analyze: merge if branches on debugger

No functional changes, just refactoring.

3 months agoanalyze: fix memleak and missing oom check
Yu Watanabe [Thu, 17 Jul 2025 16:20:18 +0000 (01:20 +0900)] 
analyze: fix memleak and missing oom check

Follow-up for ad6e02e7b42db35178305614e643be7a62568d87.

3 months agoanalyze-unit-shell: drop unnecessary error check
Yu Watanabe [Thu, 17 Jul 2025 16:13:44 +0000 (01:13 +0900)] 
analyze-unit-shell: drop unnecessary error check

execl() and friends will not return on success.

Follow-up for 9a08000d186396bc8bcb8fe057720417543c3bf0.

3 months agoanalyze: add missing full stop in the log message
Yu Watanabe [Thu, 17 Jul 2025 16:12:31 +0000 (01:12 +0900)] 
analyze: add missing full stop in the log message

Follow-up for 9a08000d186396bc8bcb8fe057720417543c3bf0 and
ad6e02e7b42db35178305614e643be7a62568d87.

3 months agotest: add basic test for timer serialization
Matteo Croce [Tue, 24 Jun 2025 12:47:43 +0000 (14:47 +0200)] 
test: add basic test for timer serialization

Set an OnCalendar= timer before the downgrade, then test for its
validity after the downgrade and the upgrade.

3 months agosrc/shared: grammar fixlet 38252/head
Zbigniew Jędrzejewski-Szmek [Thu, 17 Jul 2025 15:09:44 +0000 (17:09 +0200)] 
src/shared: grammar fixlet

There is no such verb as "list up". Also nowadays we just say "drop-ins".

3 months agoboot: move/adjust comments
Zbigniew Jędrzejewski-Szmek [Wed, 16 Jul 2025 11:40:34 +0000 (13:40 +0200)] 
boot: move/adjust comments

The comment in linux_exec() was based on Lennart's comment in
https://github.com/systemd/systemd/pull/37372#discussion_r2142340582, but
shortened. The original wording is more direct and at least for me easier to
grok, so adjust the comment to be more verbose again.

Also, move the comment from shim_loader_available() to the place where it used.
This function is for checking if the new thing is available, no need to describe
the old thing there.

3 months agotest: resolve: add integration tests for browsing services 22532/head
Vishal Chillara Srinivas [Thu, 17 Jul 2025 14:11:21 +0000 (19:41 +0530)] 
test: resolve: add integration tests for browsing services

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
Co-authored-by: Vishwanath Chandapur <vishwanath.chandapur@philips.com>