]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agocatalog: add entries for the order cycle log messages 37893/head
Lennart Poettering [Thu, 19 Jun 2025 08:15:49 +0000 (10:15 +0200)] 
catalog: add entries for the order cycle log messages

Fixes: #35642
4 months agocore: when removing a job from a transaction, include in structured log message which
Lennart Poettering [Thu, 19 Jun 2025 08:15:35 +0000 (10:15 +0200)] 
core: when removing a job from a transaction, include in structured log message which

4 months agocore: cast log_oom() got void
Lennart Poettering [Wed, 18 Jun 2025 09:51:45 +0000 (11:51 +0200)] 
core: cast log_oom() got void

4 months agocore: change ordering cycle log message log levels
Lennart Poettering [Wed, 18 Jun 2025 09:48:39 +0000 (11:48 +0200)] 
core: change ordering cycle log message log levels

Let's downgrade the log message about our attempts to deal with an
ordering cycle to warning, because this is a "positive" thing, we try to
improve an earlier error.

OTOH increase the log level when we first log about the cycle to error,
since that highlights the actual problem.

4 months agocore: make log cycle messages recognizable via message IDs
Lennart Poettering [Wed, 18 Jun 2025 09:47:25 +0000 (11:47 +0200)] 
core: make log cycle messages recognizable via message IDs

4 months agocore: output log cycle path in one log message, not many
Lennart Poettering [Wed, 18 Jun 2025 09:47:06 +0000 (11:47 +0200)] 
core: output log cycle path in one log message, not many

Fixes: #35642
4 months agoUse paths specified from environment variables for /etc configuration files
Valentin David [Mon, 10 Mar 2025 09:53:41 +0000 (10:53 +0100)] 
Use paths specified from environment variables for /etc configuration files

Some configuration files that need updates are directly under in /etc. To
update them atomically, we need write access to /etc. For Ubuntu Core this is
an issue as /etc is not writable. Only a selection of subdirectories can be
writable. The general solution is symlinks or bind mounts to writable places.
But for atomic writes in /etc, that does not work. So Ubuntu has had a patch
for that that did not age well.

Instead we would like to introduce some environment variables for alternate
paths.

 * SYSTEMD_ETC_HOSTNAME: /etc/hostname
 * SYSTEMD_ETC_MACHINE_INFO: /etc/machine-info
 * SYSTEMD_ETC_LOCALTIME: /etc/localtime
 * SYSTEMD_ETC_LOCALE_CONF: /etc/locale.conf
 * SYSTEMD_ETC_VCONSOLE_CONF: /etc/vconsole.conf
 * SYSTEMD_ETC_ADJTIME: /etc/adjtime

While it is for now expected that there is a symlink from the standard, we
still try to read them from that alternate path. This is important for
`/etc/localtime`, which is a symlink, so we cannot have an indirect symlink or
bind mount for it.

Since machine-id is typically written only once and not updated. This commit
does not cover it. An initrd can properly create it and bind mount it.

4 months agoupdate TODO
Lennart Poettering [Mon, 23 Jun 2025 12:37:37 +0000 (14:37 +0200)] 
update TODO

4 months agohomed: do not log new password when debug logs are enabled
Luca Boccassi [Sun, 22 Jun 2025 15:44:02 +0000 (16:44 +0100)] 
homed: do not log new password when debug logs are enabled

systemd-homed[3443]: Sending to worker:
{
  "enforcePasswordPolicy": false,
  "userName": "foobarbaz",
  "perMachine": [
    {
      "storage": "directory",
      "matchMachineId": "c1082742b92c4f7e8d30d6b17f9d3351"
    }
  ],
  "disposition": "regular",
  "lastChangeUSec": 1750606709833174,
  "lastPasswordChangeUSec": 1750606709833174,
  "privileged": {
    "hashedPassword": [
      "$y$j9T$ai2Fshq0ev9W05WL4SoRJ1$EFfe41ACrJKXMCQ83A05n6UW.HrRr9/O4b1x0CXgAXD"
    ]
  },
  "binding": {
    "c1082742b92c4f7e8d30d6b17f9d3351": {
      "blobDirectory": "/var/cache/systemd/home/foobarbaz",
      "uid": 60056,
      "gid": 60056
    }
  },
  "secret": {
    "password": [
      "test"
    ]
  },
  "__systemd_homework_internal_blob_fdmap": {}
}

4 months agohwdb: Add hwbd definitions for maker tools
Bastien Nocera [Sat, 21 Jun 2025 18:01:18 +0000 (20:01 +0200)] 
hwdb: Add hwbd definitions for maker tools

As originally added back in 2016 in 68ea57b21d4d ("Added support
for 3D printers to uaccess (ID_MAKER_TOOL)").

The first devices added would be 3D printers compatible with Flashprint
from Flashforge, as listed in this connector plugin:
https://github.com/Mrnt/OctoPrint-FlashForge/blob/master/octoprint_flashforge/__init__.py#L28

See https://github.com/flathub/com.flashforge.FlashPrint/issues/59

4 months agohwdb: Add support for Lenovo IdeaPad Slim 5 series
Oliver Schramm [Sun, 22 Jun 2025 11:51:51 +0000 (13:51 +0200)] 
hwdb: Add support for Lenovo IdeaPad Slim 5 series

Signed-off-by: Oliver Schramm <oliver.schramm97@gmail.com>
4 months agopo: Translated using Weblate (Greek)
Jim Spentzos [Sun, 22 Jun 2025 12:13:39 +0000 (12:13 +0000)] 
po: Translated using Weblate (Greek)

Currently translated at 35.0% (90 of 257 strings)

Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main

4 months agobootctl: honour architecture when updating boot loaders (#37913)
Yu Watanabe [Fri, 20 Jun 2025 17:25:17 +0000 (02:25 +0900)] 
bootctl: honour architecture when updating boot loaders (#37913)

Fixes: #33413
Follow-up for: #30418

4 months agoupdate TODO
Lennart Poettering [Fri, 20 Jun 2025 10:58:46 +0000 (12:58 +0200)] 
update TODO

4 months agocore: escape UTF-8 in mount unit Where field before sending to clients
Lennart Poettering [Fri, 20 Jun 2025 11:16:10 +0000 (13:16 +0200)] 
core: escape UTF-8 in mount unit Where field before sending to clients

Followup for: 4804da58536ab7ad46178a03f4d2da49fd8e4ba2 #27541

Fixes: #36206
4 months agocopy: when looking for file holes, consider empty data segments
Lennart Poettering [Fri, 20 Jun 2025 10:07:27 +0000 (12:07 +0200)] 
copy: when looking for file holes, consider empty data segments

This could mean that we hit EOF, or it could mean that somebody punched
a hole concurrently where we are currently looking. Let's figure this
out by simply trying to copy a single byte, which will give us a
definitive answer.

Fixes: #35569
4 months agologind inhibitor code fixes (#37907)
Yu Watanabe [Fri, 20 Jun 2025 17:09:52 +0000 (02:09 +0900)] 
logind inhibitor code fixes (#37907)

Fixes: #35565
4 months agojournal-gatewayd: make num_entries in Range header optional again
Jan Čermák [Wed, 18 Jun 2025 15:32:49 +0000 (17:32 +0200)] 
journal-gatewayd: make num_entries in Range header optional again

Since 435c372ce5059082212d37ac7039844f14f34a80 added in v256,
num_entries part of the Range header is mandatory and error is returned
when it's not filled in. This makes using the "follow" argument clumsy,
because for an indefinite following of the logs, arbitrary high number
must be specified. This change makes it possible to omit it again and
documents this behavior in the man page.

Moreover, as the cursor part of the header was never mandatory, enclose
it in square brackets in the documentation as well and elaborate how
indexing works.

Following are some concrete examples of the Range header which are now
accepted:

 entries= (or entries=:)
  - everything starting from the first event

 entries=cursor
  - everything starting from `cursor`

 entries=:-9:10
  - last 10 events and close the connection

If the follow flag is set:

 entries=:-4:10
  - last 5 events, wait for 5 new and close connection

 entries=:-9:
  - last 10 events and keep streaming

Note that only the very last one is changing current behavior, but
reintroduces pre-v256 compatibility.

Fixes #37172

4 months agobootctl: when updating everything check PE machine type 37913/head
Lennart Poettering [Fri, 20 Jun 2025 12:03:57 +0000 (14:03 +0200)] 
bootctl: when updating everything check PE machine type

Let's never accidentally over-write foreign-arch PE binaries with native
ones.

Fixes: #33413
4 months agobootctl: be more careful when opening arbitrary files from ESP
Lennart Poettering [Fri, 20 Jun 2025 11:59:04 +0000 (13:59 +0200)] 
bootctl: be more careful when opening arbitrary files from ESP

Let's refuse all kind of weird stuff early.

As suggested here: https://github.com/systemd/systemd/pull/30418#pullrequestreview-2128220792

4 months agologind: fix boolean comparison 37907/head
Lennart Poettering [Thu, 19 Jun 2025 16:27:06 +0000 (18:27 +0200)] 
logind: fix boolean comparison

We cannot compare a boolean with a bit mask. This worked only by
accident, since MANAGER_IS_INHIBITED_CHECK_DELAY happened to be 1. But
we need to do this properly.

Fixes: #35565
4 months agologind: fix minor coding style issues
Lennart Poettering [Thu, 19 Jun 2025 16:26:54 +0000 (18:26 +0200)] 
logind: fix minor coding style issues

Fixes: #35565
4 months agotpm2: print clear log message in case of dictionary lockout mode (#37894)
Luca Boccassi [Thu, 19 Jun 2025 21:55:36 +0000 (22:55 +0100)] 
tpm2: print clear log message in case of dictionary lockout mode (#37894)

Fixes: #32260
4 months agoresolved: enforce RefuseRecordTypes= also in proxy mode (#37902)
Yu Watanabe [Thu, 19 Jun 2025 20:59:24 +0000 (05:59 +0900)] 
resolved: enforce RefuseRecordTypes= also in proxy mode (#37902)

Fixes: #36491
4 months agonspawn: --network-veth also works with unpriv nspawn
Lennart Poettering [Thu, 19 Jun 2025 16:13:20 +0000 (18:13 +0200)] 
nspawn: --network-veth also works with unpriv nspawn

(because we ask nsresourced for help)

Fixes: #36179
4 months agoresolved: make bypass tests work 37902/head
Lennart Poettering [Thu, 19 Jun 2025 16:28:16 +0000 (18:28 +0200)] 
resolved: make bypass tests work

It's not sufficient to append a DNS key to a packet, we must also update
the qdcount too. We got this right in most tests but didn#t here.
Moreover, we must extract the packet then to actually have a DnsQuestion
properly filled in.

Fix that. Without this the tests didn't test anything reasonable.

4 months agoresolved: honour RefuseRecordTypes= also in proxy mode
Lennart Poettering [Thu, 19 Jun 2025 15:50:40 +0000 (17:50 +0200)] 
resolved: honour RefuseRecordTypes= also in proxy mode

Fixes: #36491
4 months agoresolved: use dns_question_isempty() where appropriate
Lennart Poettering [Thu, 19 Jun 2025 15:50:02 +0000 (17:50 +0200)] 
resolved: use dns_question_isempty() where appropriate

4 months agoresolved: split out helper that determines on RefuseRecordTypes= match
Lennart Poettering [Thu, 19 Jun 2025 15:44:14 +0000 (17:44 +0200)] 
resolved: split out helper that determines on RefuseRecordTypes= match

4 months agoSeveral assorted cleanups (#37888)
Yu Watanabe [Thu, 19 Jun 2025 15:58:48 +0000 (00:58 +0900)] 
Several assorted cleanups (#37888)

4 months agocryptsetup: handle DA lockout/bad PIN properly 37894/head
Lennart Poettering [Thu, 19 Jun 2025 10:28:32 +0000 (12:28 +0200)] 
cryptsetup: handle DA lockout/bad PIN properly

Now that we have recognizable errors, let's print clear error messages
when we try to unlock a TPM slot. And in case of the token plugin
propagate this as ENOANO so that libcryptsetup recognizes this as bad
PIN. (ENOANO is documented as the error to return in that case)

Fixes: #32260
4 months agotpm2-util: recognize DA lockout mode and PIN failures properly
Lennart Poettering [Thu, 19 Jun 2025 10:26:45 +0000 (12:26 +0200)] 
tpm2-util: recognize DA lockout mode and PIN failures properly

When we create the policy session the previously passed PIN will be
checked. This means we'll see PIN errors here, in case the PIN is wrong
or if DA lockout mode has been triggered.

Recognize these two errors, and bubble up recognizable errors.

4 months agotest-bpf-firewall: use ASSERT_XYZ() and bpf_program_pin() 37888/head
Yu Watanabe [Wed, 18 Jun 2025 18:32:15 +0000 (03:32 +0900)] 
test-bpf-firewall: use ASSERT_XYZ() and bpf_program_pin()

4 months agoioprio-util: move from basic/ to shared/
Yu Watanabe [Wed, 18 Jun 2025 03:05:14 +0000 (12:05 +0900)] 
ioprio-util: move from basic/ to shared/

It is not used by libsystemd.

4 months agomissing_network: IPPROTO_MPTCP is already defined in linux/in.h
Yu Watanabe [Wed, 18 Jun 2025 01:34:06 +0000 (10:34 +0900)] 
missing_network: IPPROTO_MPTCP is already defined in linux/in.h

And the header is already included through (our implementation of)
netinet/in.h, hence we can safely drop the definition here.

4 months agosd-lldp: replace ETHERTYPE_LLDP with ETH_P_LLDP
Yu Watanabe [Wed, 18 Jun 2025 01:24:23 +0000 (10:24 +0900)] 
sd-lldp: replace ETHERTYPE_LLDP with ETH_P_LLDP

ETH_P_LLDP is defined in linux/if_ether.h.

4 months agoport write_env_file() to label_os_pre() + teach firstboot a bit of relabelling (...
Yu Watanabe [Thu, 19 Jun 2025 09:03:12 +0000 (18:03 +0900)] 
port write_env_file() to label_os_pre() + teach firstboot a bit of relabelling (#37869)

This is a clean-up, and also addresses some of the points of #37857.

4 months agotest-cpu-set-util: use ASSERT_XYZ() macros
Yu Watanabe [Tue, 17 Jun 2025 18:54:43 +0000 (03:54 +0900)] 
test-cpu-set-util: use ASSERT_XYZ() macros

4 months agoman: encourage the creation of empty machine-id instead of deleting it
Lukas Nykryn [Wed, 18 Jun 2025 11:33:25 +0000 (13:33 +0200)] 
man: encourage the creation of empty machine-id instead of deleting it

Current text hints that machine-id in template image should be empty
if the system is read-only. But most of the bare metal systems and
regular VMs have /etc read-only at this phase of boot.

4 months agofd-util: move cmsg_close_all() to socket-util.[ch]
Lennart Poettering [Wed, 18 Jun 2025 07:29:48 +0000 (09:29 +0200)] 
fd-util: move cmsg_close_all() to socket-util.[ch]

This call only makes sense on sockets, it's not a generic fd concept,
hence let's move this over.

4 months agotest: add test for systemd upgrade
Matteo Croce [Mon, 14 Apr 2025 14:32:47 +0000 (16:32 +0200)] 
test: add test for systemd upgrade

Add a basic test to check that systemd works after an upgrade

4 months agodirent-util: use getdents64() as is
Yu Watanabe [Mon, 9 Jun 2025 15:17:36 +0000 (00:17 +0900)] 
dirent-util: use getdents64() as is

This partially reverts e86a492ff08526e5adf85fa881c76f80adc3c84a.

The function getdents64() was introduced in glibc-2.30, and our baseline
on glibc is 2.31. Hence, we can assume the function always exists.
The posix_getdents() wrapper was introduced for compatibility with musl.
However, even the latest release of musl does not provide posix_getdents()
yet. Also, even with musl, by defining _LARGEFILE64_SOURCE, we can get
getdents64() and struct dirent64. Hence, the wrapper is anyway not
necessary.

4 months agomallinfo-util: assume mallinfo() exists
Yu Watanabe [Mon, 9 Jun 2025 15:39:38 +0000 (00:39 +0900)] 
mallinfo-util: assume mallinfo() exists

The check existed for musl. Let's remove it, as we explicitly request glibc.

While removing the check, this also drops generic_mallinfo, introduces
a tiny converter from struct mallinfo to struct mallinfo2 if mallinfo2()
does not exist, and renames mallinfo-util.h to malloc.h.

With this change, we can drop many ifdefs and casts in .c files.

4 months agosd-bus: several coding style cleanups (#37867)
Lennart Poettering [Wed, 18 Jun 2025 08:39:48 +0000 (10:39 +0200)] 
sd-bus: several coding style cleanups (#37867)

- replace `type *func()` -> `type* func()`,
- rename arguments for storing results,
- add several missing assertions.

4 months agoupdate TODO 37869/head
Lennart Poettering [Wed, 18 Jun 2025 08:29:20 +0000 (10:29 +0200)] 
update TODO

4 months agofirstboot: make sure labelling is enabled
Lennart Poettering [Wed, 18 Jun 2025 08:29:15 +0000 (10:29 +0200)] 
firstboot: make sure labelling is enabled

Preparation to address #37857.

4 months agotmpfiles: fix symlink creation when replacing
Lennart Poettering [Wed, 18 Jun 2025 08:23:42 +0000 (10:23 +0200)] 
tmpfiles: fix symlink creation when replacing

When we remove an existing inode in order to create a symlink we need to
create the symlink via a pinned directory again, instead of using an
absolute path, otherwise this will not work in the --root= case.

Let's fix this, and switch this over to symlinkat_atomic_full().

4 months agofirstboot: use WRITE_STRING_FILE_LABEL more
Lennart Poettering [Tue, 17 Jun 2025 13:09:34 +0000 (15:09 +0200)] 
firstboot: use WRITE_STRING_FILE_LABEL more

Let's explicitly label 3 key files we generate in systemd-firstboot.

Addresses some more of #37857.

4 months agoenv-file: port write_env_file() to label_ops_pre()
Lennart Poettering [Tue, 17 Jun 2025 12:58:36 +0000 (14:58 +0200)] 
env-file: port write_env_file() to label_ops_pre()

Let's make more use of label_ops_pre()/label_ops_post(), and replace
write_env_file_label() by a flag to write_env_file().

This simplifies and normalizes the code.

This also makes one relevant change: it sets the new
WRITE_ENV_FILE_LABEL flag in firstboot.c when we write locale.conf,
where we previously did not (but should have). This should address one
detail of #37857.

4 months agofs-util: replace symlink_atomic_full_label() by a flag to symlinkat_atomic_full()
Lennart Poettering [Wed, 18 Jun 2025 08:14:09 +0000 (10:14 +0200)] 
fs-util: replace symlink_atomic_full_label() by a flag to symlinkat_atomic_full()

More porting work to label_ops_pre()/label_ops_post()

This also enables labelling of the /etc/localtime symlink in
systemd-firstboot, which should address one small facet of #37857

4 months agosd-lldp: several improvements (#37845)
Yu Watanabe [Tue, 17 Jun 2025 19:58:04 +0000 (04:58 +0900)] 
sd-lldp: several improvements (#37845)

This makes
- sd-lldp-tx not send machine ID as chassis ID, but use application
specific machine ID,
- sd-lldp-tx emit vlan ID if it is running on a vlan interface,
- Describe() DBus method also reply LLDP configurations,
- io.systemd.Network.GetLLDPNeighbors varlink method provides vlan ID,
if received.

Closes #37613.

4 months agoresolved: Tweak link-local addresses relevancy
George Tsiamasiotis [Tue, 17 Jun 2025 12:30:41 +0000 (15:30 +0300)] 
resolved: Tweak link-local addresses relevancy

We now consider link-local addresses routable when we have configured
unicast link-local dns servers. This allows creating the DNS scope, even
when the interface doesn't get a routable address.

4 months agobus-util: coding style cleanups 37867/head
Yu Watanabe [Tue, 17 Jun 2025 14:52:11 +0000 (23:52 +0900)] 
bus-util: coding style cleanups

- replace `type *func()` -> `type* func()`,
- rename arguments for storing results.

4 months ago sd-bus: coding style cleanups
Yu Watanabe [Tue, 17 Jun 2025 13:39:09 +0000 (22:39 +0900)] 
 sd-bus: coding style cleanups

- replace `type *func()` -> `type* func()`,
- rename arguments for storing results,
- add several missing assertions.

4 months agosd-bus: BusMessageContainer.begin is always zero in sd_bus_message_open_container()
Yu Watanabe [Tue, 17 Jun 2025 15:21:11 +0000 (00:21 +0900)] 
sd-bus: BusMessageContainer.begin is always zero in sd_bus_message_open_container()

4 months agotest-network: compare LLDP sender and receiver information 37845/head
Yu Watanabe [Sun, 15 Jun 2025 02:36:01 +0000 (11:36 +0900)] 
test-network: compare LLDP sender and receiver information

4 months agonetwork: also include information about LLDP sender in reply for Describe() method
Yu Watanabe [Sun, 15 Jun 2025 01:13:25 +0000 (10:13 +0900)] 
network: also include information about LLDP sender in reply for Describe() method

Addresses https://github.com/systemd/systemd/pull/37845#issuecomment-2973257825.

4 months agosd-lldp-tx: introduce sd_lldp_tx_describe() to dump current settings
Yu Watanabe [Sun, 15 Jun 2025 01:04:37 +0000 (10:04 +0900)] 
sd-lldp-tx: introduce sd_lldp_tx_describe() to dump current settings

4 months agoboot: fix typo
Yu Watanabe [Tue, 17 Jun 2025 16:47:45 +0000 (01:47 +0900)] 
boot: fix typo

Follow-up for cab9c7b5a42effa8a45611fc6b8556138c869b5f.

4 months agosd-lldp-rx: also dump received MUD URL
Yu Watanabe [Sun, 15 Jun 2025 01:52:16 +0000 (10:52 +0900)] 
sd-lldp-rx: also dump received MUD URL

4 months agonetwork/lldp-tx: also emit VLAN ID
Yu Watanabe [Sun, 15 Jun 2025 01:38:38 +0000 (10:38 +0900)] 
network/lldp-tx: also emit VLAN ID

4 months agosd-lldp-tx: allow to emit VLAN ID
Yu Watanabe [Sun, 15 Jun 2025 01:35:18 +0000 (10:35 +0900)] 
sd-lldp-tx: allow to emit VLAN ID

4 months agosd-lldp-tx: append capabilities before MUD URL
Yu Watanabe [Sun, 15 Jun 2025 01:20:12 +0000 (10:20 +0900)] 
sd-lldp-tx: append capabilities before MUD URL

No functional change, but let's append vendor specific informations
after others to sort the TLVs with their type.

4 months agosd-lldp-tx: do not expose machine ID by default
Yu Watanabe [Sat, 14 Jun 2025 19:03:26 +0000 (04:03 +0900)] 
sd-lldp-tx: do not expose machine ID by default

Previously, systemd-networkd sent machine ID as chassis ID.
Let's use application specific machine ID.

This is a kind of backward compat breaking. Hence, this also introduces
the support of $SD_LLDP_SEND_MACHINE_ID environment variable.

Closes #37613.

4 months agocgroup-util: Always open cgroupv2 attribute files in O_NONBLOCK mode
Daan De Meyer [Tue, 22 Apr 2025 08:36:21 +0000 (10:36 +0200)] 
cgroup-util: Always open cgroupv2 attribute files in O_NONBLOCK mode

As explained in https://lore.kernel.org/all/20250419183545.1982187-1-shakeel.butt@linux.dev/,
writing to memory.max or memory.high triggers synchronous memory reclaim
if the limit is lowered. This can end up taking nonnegligible amounts
of time, completely blocking pid1 from doing any other work while the
reclaim is ongoing.

To address this problem, the kernel going to add O_NONBLOCK semantics
to memory.max and memory.high. If the file is opened with O_NONBLOCK,
the synchronous memory reclaim is skipped and only triggered later
without blocking the process writing the file. Let's make sure we make
use of this by opening cgroupv2 attribute files with O_NONBLOCK.

We opt to do this for all cgroupv2 attribute files, to make sure that
if the same problem happens elsewhere in the future and is fixed in the
same way, we immediately take advantage of that fix without having to
make changes in systemd as well. We probably never want to block when
writing cgroupv2 attributes and any cases where we do want to block should
indicate so explicitly instead of blocking by default.

4 months agocore/timer: Introduce RandomOffsetSec= knob (#36437)
Lennart Poettering [Tue, 17 Jun 2025 14:05:12 +0000 (16:05 +0200)] 
core/timer: Introduce RandomOffsetSec= knob (#36437)

This is like RandomDelaySec, but it doesn't reset whenever the manager
restarts.

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

4 months agovarious: turn off SO_PASSRIGHTS where fds are not expected (#37759)
Lennart Poettering [Tue, 17 Jun 2025 13:37:35 +0000 (15:37 +0200)] 
various: turn off SO_PASSRIGHTS where fds are not expected (#37759)

4 months agostub: call inner kernel directly (#37372)
Lennart Poettering [Tue, 17 Jun 2025 12:34:53 +0000 (14:34 +0200)] 
stub: call inner kernel directly (#37372)

Since shim 16, it is not possible anymore to override the security arch
protocol to avoid signature check and measurements.

Also on Dell servers, EFI_SECURITY2_ARCH_PROTOCOL is not implemented, so
unexpected measurements on PCR 4 were still happening.

This just loads and run the kernel pe. We verify that there is no
relocation needed. Also for simplification, we assume and verify that
the base address is expected to be 0.

4 months agonetwork/dhcp-server: improvements for saving/loading leases (#37835)
Lennart Poettering [Tue, 17 Jun 2025 12:31:22 +0000 (14:31 +0200)] 
network/dhcp-server: improvements for saving/loading leases (#37835)

4 months agoman: fix varname copypasta
Luca Boccassi [Sat, 14 Jun 2025 00:44:11 +0000 (01:44 +0100)] 
man: fix varname copypasta

4 months agovarious: turn off SO_PASSRIGHTS where fds are not expected 37759/head
Mike Yuan [Fri, 6 Jun 2025 20:00:52 +0000 (22:00 +0200)] 
various: turn off SO_PASSRIGHTS where fds are not expected

4 months agosd-varlink: hook up fd passing control with SO_PASSRIGHTS
Mike Yuan [Fri, 6 Jun 2025 19:47:39 +0000 (21:47 +0200)] 
sd-varlink: hook up fd passing control with SO_PASSRIGHTS

This is a tricky one, because we effectively turn fd passing input
toggle into a tristate: unset, disabled, and enabled; whereas unset
and disabled were identical previously. *Unset* state silently
ignores SCM_RIGHTS passed by invoking recv() instead of recvmsg(),
and for disabled we now disable SO_PASSRIGHTS completely.

The plot thickens when it comes to the server, since we want to
turn off the SO_PASSRIGHTS already on the listening socket so that
there's no race between accept() and recvmsg() wrt SO_PASSRIGHTS state.
However, if we do this unconditionally, the existing use case of
creating a custom connection callback and enabling fd passing there
would be broken.

Hence, let's introduce a new flag,
SD_VARLINK_SERVER_FD_PASSING_INPUT_STRICT, which when set
ties the enablement of fd passing to SO_PASSRIGHTS in server,
and set it for all our varlink servers.

Refer to the previous commit for the rationale behind return value
change in sd_varlink_set_allow_fd_passing_input().

4 months agosd-varlink: unify AF_UNIX check in sd_varlink_set_allow_fd_passing_output()
Mike Yuan [Mon, 9 Jun 2025 22:01:53 +0000 (00:01 +0200)] 
sd-varlink: unify AF_UNIX check in sd_varlink_set_allow_fd_passing_output()

Currently, the socket type is only checked if the fd passing is
being enabled. The special handling seems unnecessary though,
as in the disable case, either fd passing is already false and
would be caught by the (... == !!b) shortcut at the beginning,
or the AF_UNIX check wouldn't have succeeded in the first place,
for the initial toggle to true. Hence, just uniformly check
AF_UNIX.

While at it, sd_varlink_set_allow_fd_passing_*() oddly return 1
iff changed and !b, which doesn't fit into our coding style and
I can't come up with any use case for such behavior. Let's
return 1 on changed and 0 otherwise.

sd_varlink_set_allow_fd_passing_input() will be fixed in the later
commits with other enhancements.

4 months agosd-varlink: remove unneeded strdup()
Mike Yuan [Mon, 9 Jun 2025 18:06:59 +0000 (20:06 +0200)] 
sd-varlink: remove unneeded strdup()

4 months agologind: port one remaining varlink server allocation to varlink_server_new()
Mike Yuan [Fri, 6 Jun 2025 21:07:02 +0000 (23:07 +0200)] 
logind: port one remaining varlink server allocation to varlink_server_new()

4 months agonotify-recv: disable SO_PASSRIGHTS by default in notify_socket_prepare()
Mike Yuan [Thu, 5 Jun 2025 21:01:09 +0000 (23:01 +0200)] 
notify-recv: disable SO_PASSRIGHTS by default in notify_socket_prepare()

4 months agocore/socket: introduce AcceptFileDescriptors=
Mike Yuan [Fri, 6 Jun 2025 19:01:33 +0000 (21:01 +0200)] 
core/socket: introduce AcceptFileDescriptors=

This controls the new SO_PASSRIGHTS socket option in kernel v6.16.
Note that I intentionally choose a different naming scheme than
Pass*=, since all other Pass*= options controls whether some extra
bits are attached to the message, while this one's about denying
file descriptor transfer and it feels more explicit this way.
And diverging from underlying socket option name is precedented
by Timestamping=. But happy to change it to just say PassRights=
if people disagree.

4 months agomissing_socket: add SO_PASSRIGHTS
Mike Yuan [Thu, 5 Jun 2025 21:00:40 +0000 (23:00 +0200)] 
missing_socket: add SO_PASSRIGHTS

4 months agocore/socket: add PassPIDFD=
Mike Yuan [Tue, 10 Jun 2025 09:27:44 +0000 (11:27 +0200)] 
core/socket: add PassPIDFD=

4 months agocore/socket: use universal format string for socket option warnings
Mike Yuan [Tue, 10 Jun 2025 09:26:04 +0000 (11:26 +0200)] 
core/socket: use universal format string for socket option warnings

4 months agocore/socket: don't suggest PassFileDescriptorsToExec= is a socket option
Mike Yuan [Fri, 6 Jun 2025 18:31:19 +0000 (20:31 +0200)] 
core/socket: don't suggest PassFileDescriptorsToExec= is a socket option

by not interleaving it among socket options.

4 months agoudev-ctrl: enable SO_PASSCREDS on listening socket already rather than on accept()
Mike Yuan [Fri, 6 Jun 2025 18:06:45 +0000 (20:06 +0200)] 
udev-ctrl: enable SO_PASSCREDS on listening socket already rather than on accept()

This matches what systemd-udevd-control.socket does.

4 months agounits/systemd-journald@.socket: enable SO_TIMESTAMP
Mike Yuan [Fri, 16 May 2025 17:08:34 +0000 (19:08 +0200)] 
units/systemd-journald@.socket: enable SO_TIMESTAMP

Follow-up for 02229dff2b371f3a6235fe18ea72e972ddbc90a9

This applies the change to journal namespace instances too.

4 months agoREADME: add more kernel APIs we now utilize
Mike Yuan [Thu, 5 Jun 2025 21:04:16 +0000 (23:04 +0200)] 
README: add more kernel APIs we now utilize

4 months agolog: drop redundant forward decl
Mike Yuan [Thu, 5 Jun 2025 20:37:29 +0000 (22:37 +0200)] 
log: drop redundant forward decl

These are defined in forward.h already.

4 months agosd-bus: Preserve interfaces addition order
Arkadiusz Bokowy [Thu, 12 Jun 2025 14:20:29 +0000 (16:20 +0200)] 
sd-bus: Preserve interfaces addition order

When adding a new interface to the object add it at the end of the list.
This way, when iterating over the list, e.g., during handling introspect
call, the order of returned interfaces will mach the order in which they
were added.

4 months agohostname-util: introduce machine_spec_valid() and check --machine= value everywhere...
Lennart Poettering [Tue, 17 Jun 2025 07:34:22 +0000 (09:34 +0200)] 
hostname-util: introduce machine_spec_valid() and check --machine= value everywhere (#37851)

Replaces #32999

Addresses
https://github.com/systemd/systemd/pull/37741#discussion_r2128482378

4 months agofstab-generator: log about the fstype in effect
Mike Yuan [Mon, 16 Jun 2025 23:28:39 +0000 (01:28 +0200)] 
fstab-generator: log about the fstype in effect

4 months agofstab-generator: set mode=0755 with root=tmpfs
Luca Boccassi [Mon, 16 Jun 2025 22:28:57 +0000 (23:28 +0100)] 
fstab-generator: set mode=0755 with root=tmpfs

If mode= is not set in rootflags= add mode=0755 when a tmpfs
is used on the rootfs, otherwise it will be group/world writable
as that's the default mode for tmpfs filesystems.

Follow-up for 725ad3b06288b2beeaaf178120010612a30646e4

4 months agomkosi: update debian commit reference to 01b5b96a2f85594c2c8caf5d10048a4ec41f9d89
Luca Boccassi [Mon, 16 Jun 2025 23:40:56 +0000 (00:40 +0100)] 
mkosi: update debian commit reference to 01b5b96a2f85594c2c8caf5d10048a4ec41f9d89

01b5b96a2f Install new files for upstream build
a4bdf87f03 Revert "systemd-boot: always pull in systemd-boot-efi on amd64/arm64"
e29629dcaf systemd-boot: always pull in systemd-boot-efi on amd64/arm64
f0202aa0aa Update changelog for 257.6-1 release
7a5572e94d Drop patches, merged upstream
ece0caddcf Set upstream metadata fields: Security-Contact
a71d94c611 systemd-boot: fix BOOT.CSV usage

4 months agotree-wide: check --machine= specification 37851/head
Mike Yuan [Mon, 16 Jun 2025 23:48:08 +0000 (01:48 +0200)] 
tree-wide: check --machine= specification

Addresses https://github.com/systemd/systemd/pull/37741#discussion_r2128482378

4 months agosd-bus: port to machine_spec_valid()
Mike Yuan [Sun, 15 Jun 2025 17:51:26 +0000 (19:51 +0200)] 
sd-bus: port to machine_spec_valid()

4 months agohostname-util: introduce machine_spec_valid()
Mike Yuan [Sun, 15 Jun 2025 17:18:37 +0000 (19:18 +0200)] 
hostname-util: introduce machine_spec_valid()

4 months agohostname-util: do not allow empty machine spec
Mike Yuan [Sun, 15 Jun 2025 17:13:22 +0000 (19:13 +0200)] 
hostname-util: do not allow empty machine spec

Follow-up for 2ae32e9d8fc95010ee4b52b3118ea9fbf05d96d6

Let's not open this up even further and rather disallow
--machine="".

4 months agoUpdate distro packaging commits (#37765)
Yu Watanabe [Mon, 16 Jun 2025 19:46:44 +0000 (04:46 +0900)] 
Update distro packaging commits (#37765)

4 months agomkosi: update fedora commit reference to 7de88c66bdc26920db570e67ef74e579f8461d9c 37765/head
Daan De Meyer [Fri, 6 Jun 2025 13:16:08 +0000 (15:16 +0200)] 
mkosi: update fedora commit reference to 7de88c66bdc26920db570e67ef74e579f8461d9c

7de88c66bd Do not mark symlinks as %ghost
92c16c1dab Let systemd-{sysusers,shared} conflict with older systemd
ed6b885327 Version 257.6
5a53eac13c Package pcrlock files together with systemd-pcrlock
2192e86112 Move mount.ddi symlinks to -container subpackage
451184cbea Revert "Disable freezing of user sessions"
f6af46db12 Backport adb/fastboot udev rules (BZ#2356537)
f6b814cc0f Backport CI fix
d304477023 Version 257.5

4 months agomkosi: update opensuse commit reference to 2dc224ae5d446e928519315f4d46f76d1e34b8a8
Daan De Meyer [Fri, 6 Jun 2025 13:16:05 +0000 (15:16 +0200)] 
mkosi: update opensuse commit reference to 2dc224ae5d446e928519315f4d46f76d1e34b8a8

2dc224ae5d Update systemd to version 257.6 / rev 448 via SR 1281804
15818e66dd Update systemd to version 257.5 / rev 447 via SR 1278063
2480ac89f0 Update 000product to rev 4383
c381cdada8 update 2025-04-11 16:42
bb036b2b8e Update systemd to version 257.4 / rev 444 via SR 1252776
55ae12d80b Update systemd to version 257.3 / rev 443 via SR 1249841
a7fcf45b77 Update systemd to version 257.3 / rev 442 via SR 1247443

4 months agomkosi: update arch commit reference to 15cb472aeb4d93d7fae9c7b7bc2cd6723bc8ec85
Daan De Meyer [Fri, 6 Jun 2025 13:15:34 +0000 (15:15 +0200)] 
mkosi: update arch commit reference to 15cb472aeb4d93d7fae9c7b7bc2cd6723bc8ec85

15cb472aeb upgpkg: 257.6-1: new upstream release
1c11767e01 upgpkg: 257.5-3: backlight: Drop support for actual_brightness
489e88099e upgpkg: 257.5-2: fast-forward to current v257-stable

4 months agoresolve: several further fixes for reloading config (#37856)
Yu Watanabe [Mon, 16 Jun 2025 15:23:56 +0000 (00:23 +0900)] 
resolve: several further fixes for reloading config (#37856)

Fixes #37843.

4 months agoterminal-util: fix doubled 'to' in log messages
Yu Watanabe [Mon, 16 Jun 2025 13:25:24 +0000 (22:25 +0900)] 
terminal-util: fix doubled 'to' in log messages

Follow-up for 3390be38d19c9d339bbc0e003743ce4278aa58b6.