]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agojournal: replace a bunch of assert() with friendlier checks 37757/head
Lennart Poettering [Thu, 5 Jun 2025 20:26:03 +0000 (22:26 +0200)] 
journal: replace a bunch of assert() with friendlier checks

We should not rely that data stored in the journal files remains
entirely untouched at all times. Because we unallocate files, data might
go away any time. Hence, never assert() on any expectations on what the
file contains. Instead, handle it more gracefully as a corruption issue,
and return EBADMSG.

Fixes: #35229 #32436
5 months agojournal: add 'const' at one more place
Lennart Poettering [Thu, 5 Jun 2025 20:25:33 +0000 (22:25 +0200)] 
journal: add 'const' at one more place

5 months agojournal: determine compression once, not twice
Lennart Poettering [Thu, 5 Jun 2025 20:22:55 +0000 (22:22 +0200)] 
journal: determine compression once, not twice

This is just paranoia: let's determine the compression to use once,
instead of twice, after all te data is in journal files which might be
corrupted any time, and it would be weird if we came to different
results here each time.

5 months agojournal: use EBADMSG for invalid data in file mmap
Lennart Poettering [Thu, 5 Jun 2025 20:21:16 +0000 (22:21 +0200)] 
journal: use EBADMSG for invalid data in file mmap

We must assume that any data in the mmap can change anytime because the
file is deallocated or similar. Let's strictly use EBADMSG for reporting
invalid file contents though (as opposed to using EINVAL if our own code
passes a wrong parameter somwhere).

5 months agocore/varlink: split out dynamic-user stuff into its own source files
Mike Yuan [Thu, 5 Jun 2025 14:20:35 +0000 (16:20 +0200)] 
core/varlink: split out dynamic-user stuff into its own source files

5 months agohwdb: Acer Nitro ANV15-51 Mic Toggle
SoloSaravanan [Thu, 5 Jun 2025 13:06:23 +0000 (18:36 +0530)] 
hwdb: Acer Nitro ANV15-51 Mic Toggle

5 months agomountfsd: support processing block devices with MountImage() (#37746)
Lennart Poettering [Thu, 5 Jun 2025 14:51:06 +0000 (16:51 +0200)] 
mountfsd: support processing block devices with MountImage() (#37746)

Fixes: #35111
5 months agocore: Various fixes for cgroup and pid namespaces (#36815)
Daan De Meyer [Thu, 5 Jun 2025 13:21:59 +0000 (15:21 +0200)] 
core: Various fixes for cgroup and pid namespaces (#36815)

5 months agomeson: Don't fail install script if file doesn't exist
Daan De Meyer [Thu, 5 Jun 2025 10:14:45 +0000 (12:14 +0200)] 
meson: Don't fail install script if file doesn't exist

Depending on which optional features are enabled, the NSS module
might not have been built, which means the custom install script
will fail to remove the file. Let's pass -f so it succeeds regardless
of whether the file exists or not.

5 months agoman: suggest using --unlock-tpm2-device=auto in cryptenroll example
Lennart Poettering [Thu, 5 Jun 2025 12:40:42 +0000 (14:40 +0200)] 
man: suggest using --unlock-tpm2-device=auto in cryptenroll example

When refreshing a tpm2 enrollment, it makes sense to use tpm2 to unlock
the device.

Fixes: #35279
5 months agomeson: Add libmount feature
Daan De Meyer [Thu, 5 Jun 2025 09:05:08 +0000 (11:05 +0200)] 
meson: Add libmount feature

Let's reduce the dependencies required to build just libsystemd by
making libmount optional. The meson disabler feature makes this quite
trivial.

5 months agoadd CITATION.cff file
Lennart Poettering [Thu, 5 Jun 2025 12:35:26 +0000 (14:35 +0200)] 
add CITATION.cff file

As per spec: https://citation-file-format.github.io/

Fixes: #35260
5 months agomountfsd: slightly relax check on image fds 37746/head
Lennart Poettering [Thu, 5 Jun 2025 12:12:18 +0000 (14:12 +0200)] 
mountfsd: slightly relax check on image fds

Fixes: #35111
5 months agodissect-image: port to varlink_callbo_and_log()
Lennart Poettering [Thu, 5 Jun 2025 11:18:45 +0000 (13:18 +0200)] 
dissect-image: port to varlink_callbo_and_log()

5 months agovarlink-util: format system errors via %m in varlink_call_and_log()
Lennart Poettering [Thu, 5 Jun 2025 11:17:17 +0000 (13:17 +0200)] 
varlink-util: format system errors via %m in varlink_call_and_log()

This kinda does what bee59ab901ca199d194f440cf37f7645004d3054 did for
varlinkctl also for the generic varlink_call_and_log() handler.

5 months agofixes for --machine= handling in run0 and journalctl (#37741)
Lennart Poettering [Thu, 5 Jun 2025 12:02:26 +0000 (14:02 +0200)] 
fixes for --machine= handling in run0 and journalctl (#37741)

Fixes: #32997
5 months agoresolvectl: --raw improvements (#37743)
Lennart Poettering [Thu, 5 Jun 2025 12:02:00 +0000 (14:02 +0200)] 
resolvectl: --raw improvements (#37743)

Fixes: #37737
5 months agocore: rework how we track cgroup realized state (#37733)
Mike Yuan [Thu, 5 Jun 2025 10:56:31 +0000 (12:56 +0200)] 
core: rework how we track cgroup realized state (#37733)

5 months agosd-bus: treat '@' as equivalent to '@.host' 37741/head
Lennart Poettering [Thu, 5 Jun 2025 09:53:04 +0000 (11:53 +0200)] 
sd-bus: treat '@' as equivalent to '@.host'

We allow omission of the part before and the part after the @. But so
far we didn't allow omitting both. There's no real reason for
disallowing that, hence be systematic and allow it.

5 months agosd-bus: port to split_user_at_host()
Lennart Poettering [Thu, 5 Jun 2025 09:52:47 +0000 (11:52 +0200)] 
sd-bus: port to split_user_at_host()

5 months agojournalctl: politely refuse if non-root usernames are specified for --machine=
Lennart Poettering [Thu, 5 Jun 2025 09:27:53 +0000 (11:27 +0200)] 
journalctl: politely refuse if non-root usernames are specified for --machine=

We currently cannot support that (supporting that would probably require
some active component in the machine, or alternatively idmapped mounts
or so), hence politely refuse it.

See: https://github.com/systemd/systemd/issues/32997#issuecomment-2127700945

5 months agorun: chop off username from --machine= argument before calling OpenMachinePTY()
Lennart Poettering [Wed, 4 Jun 2025 16:28:35 +0000 (18:28 +0200)] 
run: chop off username from --machine= argument before calling OpenMachinePTY()

Let's be compatible with sd-bus' logic to talk to machine, and support
the usual user@host syntax. We only want the host part, hence chop if
off before passing it to OpenMachinePTY().

Fixes: #32997
5 months agomachined: open up OpenMachinePTY() for unpriv clients
Lennart Poettering [Thu, 5 Jun 2025 08:58:54 +0000 (10:58 +0200)] 
machined: open up OpenMachinePTY() for unpriv clients

The method call already does a PK check, it was just forgotten to
allowlist this in the dbus policy. And in the dbus vtable for
OpenMachinePTY() call. (It was allowlisted in the per-machine
vtable…)

Anyway, clean this up.

5 months agohostname-util: add new helper split_user_at_host()
Lennart Poettering [Thu, 5 Jun 2025 09:17:22 +0000 (11:17 +0200)] 
hostname-util: add new helper split_user_at_host()

Let's introduce a common helper for splitting user@host specifications
like we use them for --machine=.

5 months agoresolvectl: improve error message if we do not support dumping payload of RR 37743/head
Lennart Poettering [Thu, 5 Jun 2025 10:43:36 +0000 (12:43 +0200)] 
resolvectl: improve error message if we do not support dumping payload of RR

5 months agoman: reword --raw= explanation a bit
Lennart Poettering [Thu, 5 Jun 2025 10:22:34 +0000 (12:22 +0200)] 
man: reword --raw= explanation a bit

Explain what we mean by "payload", and for which RR types this is
intended.

And don#t claim we'd output a full packet, because we don't. We output
only the RR in binary.

Fixes: #37737
5 months agoresolvectl: output slightly more data when --raw=payload is used
Lennart Poettering [Thu, 5 Jun 2025 10:17:01 +0000 (12:17 +0200)] 
resolvectl: output slightly more data when --raw=payload is used

Let's also show A/AAAA data in binary form if --raw=payload is used. For
these RR types there's only a single data field, hence it's obbviously
meant.

Inspired by: #37737

5 months ago core: Make sure we handle DelegateSubgroup= in combo with cgroupns 36815/head
Daan De Meyer [Fri, 25 Apr 2025 10:40:52 +0000 (12:40 +0200)] 
 core: Make sure we handle DelegateSubgroup= in combo with cgroupns

Currently, if we use a cgroup namespace together with DelegateSubgroup=,
the subgroup becomes the root of the cgroup namespace because we move the
service process to the subgroup before we unshare the cgroup namespace, and
the current cgroup becomes the root of the cgroup namespace when we unshare
the cgroup namespace.

Let's fix the problem by not moving the service process to the subgroup until
we've unshared the cgroup namespace. Note that this doesn't break the primary use
case of CLONE_INTO_CGROUP since we still use it to immediately clone into the service
main cgroup, just not anymore into the subgroup, but this shouldn't matter in practice.

Additionally, we need special handling for control processes, as those *do*
need to get spawned into the subcgroup immediately if delegation is configured to
avoid violating the cgroupsv2 "no inner processes" rule.

Effectively, this leaves us with the following logic:
- In exec_spawn(), spawn into subgroup if we're spawning a control process
  that needs to be spawned into a subgroup immediately. Otherwise, spawn into
  main service cgroup.
- In exec_invoke(), move into subgroup early if we don't need a cgroup namespace.
  Otherwise, move into subgroup after we've unshared the cgroup namespace.

5 months agocore: Disable pid namespacing for control processes
Daan De Meyer [Fri, 21 Mar 2025 08:41:15 +0000 (09:41 +0100)] 
core: Disable pid namespacing for control processes

PID namespaces frankly don't make any sense for control processes, so
let's gracefully degrade to no pid namespaces for control processes.

5 months agomeson: Remove unnecessary deps from libsystemd-static build
Daan De Meyer [Thu, 5 Jun 2025 09:04:06 +0000 (11:04 +0200)] 
meson: Remove unnecessary deps from libsystemd-static build

blkid, libmount and openssl are not used in src/basic or src/libsystemd,
and so shouldn't be required as deps of libsystemd static, so let's drop
them.

5 months agoptyfwd: introduce pty_forward_set_window_title() helper function
Yu Watanabe [Thu, 5 Jun 2025 05:59:40 +0000 (14:59 +0900)] 
ptyfwd: introduce pty_forward_set_window_title() helper function

5 months agohwdb: add support for Loupedeck devices
tytan652 [Thu, 5 Jun 2025 09:26:58 +0000 (11:26 +0200)] 
hwdb: add support for Loupedeck devices

Razer has partnered with Loupedeck to develop some devices.

Add support for the following devices:
- Loupedeck CT
- Loupedeck Live
- Loupedeck Live S
- Razer Stream Controller
- Razer Stream Controller X

5 months agosd-daemon: add sd_pidfd_get_inode_id() (#37679)
Lennart Poettering [Thu, 5 Jun 2025 07:31:48 +0000 (09:31 +0200)] 
sd-daemon: add sd_pidfd_get_inode_id() (#37679)

5 months agovmspawn: fix call to GetUnitByPID
Sam Leonard [Mon, 2 Jun 2025 15:13:13 +0000 (16:13 +0100)] 
vmspawn: fix call to GetUnitByPID

This commit also adds a handler for SIGRTMIN+4 which is another signal
used to shutdown systemd.

5 months agotest-daemon: add test case for sd_pidfd_get_inode_id() 37679/head
Mike Yuan [Tue, 3 Jun 2025 15:15:00 +0000 (17:15 +0200)] 
test-daemon: add test case for sd_pidfd_get_inode_id()

5 months agosd-daemon: add sd_pidfd_get_inode_id()
Mike Yuan [Sun, 1 Jun 2025 07:12:13 +0000 (09:12 +0200)] 
sd-daemon: add sd_pidfd_get_inode_id()

We nowadays expose pidfdid at various places, e.g. envvars
and dbus properties. Also the sd_notify() MAINPID= message
has been complemented with MAINPIDFDID=. But acquiring
pidfdid is actually non-trivial especially considering
the 32-bit case, hence let's introduce a public helper
in sd-daemon specifically for that purpose.

5 months agopidfd-util: extract pidfd_get_inode_id_impl() and make it thread safe
Mike Yuan [Sun, 1 Jun 2025 06:57:49 +0000 (08:57 +0200)] 
pidfd-util: extract pidfd_get_inode_id_impl() and make it thread safe

Preparation for later commits.

5 months agopidfd-util: open an internal pidfd if none is passed in pidfd_check_pidfs()
Mike Yuan [Sun, 1 Jun 2025 06:55:50 +0000 (08:55 +0200)] 
pidfd-util: open an internal pidfd if none is passed in pidfd_check_pidfs()

I'd like to introduce a libsystemd helper for acquiring pidfd
inode id, which however means the fd passed to pidfd_check_pidfs()
can no longer be trusted. Let's add back the logic of allocating
a genuine pidfd allocated internally, which was remove in
5dc9d5b4eacbe32f58ad6ca18d70931ab89ea409.

5 months agoman/sd_pid_get_owner_uid: don't limit -EBADF to socket fds
Mike Yuan [Sun, 1 Jun 2025 07:06:36 +0000 (09:06 +0200)] 
man/sd_pid_get_owner_uid: don't limit -EBADF to socket fds

5 months agosd-login: reject invalid pidfd with -EBADF consistently
Mike Yuan [Sun, 1 Jun 2025 07:04:27 +0000 (09:04 +0200)] 
sd-login: reject invalid pidfd with -EBADF consistently

We got it mostly right except for one function, fix it.

5 months agosd-login: various modernizations (#37728)
Lennart Poettering [Wed, 4 Jun 2025 20:24:57 +0000 (22:24 +0200)] 
sd-login: various modernizations (#37728)

5 months agoio-util: protect against INT_MAX overflow in flush_fd()
Lennart Poettering [Wed, 4 Jun 2025 14:05:41 +0000 (16:05 +0200)] 
io-util: protect against INT_MAX overflow in flush_fd()

5 months agocore/cgroup: make various functions static 37733/head
Mike Yuan [Wed, 4 Jun 2025 16:28:58 +0000 (18:28 +0200)] 
core/cgroup: make various functions static

Not used externally anymore with previous commits.

5 months agocore/unit-printf: port to unit_get_cgroup_path_with_fallback()
Mike Yuan [Wed, 4 Jun 2025 18:30:59 +0000 (20:30 +0200)] 
core/unit-printf: port to unit_get_cgroup_path_with_fallback()

5 months agocore: rework how we track cgroup realized state
Mike Yuan [Wed, 4 Jun 2025 15:34:11 +0000 (17:34 +0200)] 
core: rework how we track cgroup realized state

Prompted by https://github.com/systemd/systemd/pull/37646#discussion_r2126882561

Follow-up for 879952a85311ca375c673480d9718a9e0cd93c1d

Currently, almost all cgroup attr getters check cgroup_path for whether
cgroup is around. This is actually great, because we never want to expose
a non-existent cgroup path via IPC and such. However, it is spuriously
initialized at places where it shouldn't be, e.g. in unit_warn_leftover_processes().
This matters especially to units that *may* carry processes to run, but
not *always*, notably socket units. unit_warn_leftover_processes() is supposed
to be informative only and not try to set cgroup tracking to realized in
a half-assed way.

Hence, let's kill cgroup_realized field, and make sure cgroup_path is set
only if cgroup has been created. Be extra careful with deserialization
though, since the previous versions don't follow this rule and we need
to patch cgroup_path manually based on cgroup_realized we got from deserialization.

Calls to unit_watch_cgroup*() are dropped in cgroup_runtime_deserialize_one(),
because unit_deserialize_state() will invalidate cgroup realized state and
reapply later.

5 months agocore/cgroup: don't ever try to get SPECIAL_ROOT_SLICE from Manager.cgroup_unit
Mike Yuan [Wed, 4 Jun 2025 18:18:01 +0000 (20:18 +0200)] 
core/cgroup: don't ever try to get SPECIAL_ROOT_SLICE from Manager.cgroup_unit

This tries to query unit name in cgroup_unit hashmap, which
always returns NULL. Just return NULL directly instead.

5 months agocore/unit-serialize: drop deserialization compat for state_change_timestamp
Mike Yuan [Wed, 4 Jun 2025 19:59:23 +0000 (21:59 +0200)] 
core/unit-serialize: drop deserialization compat for state_change_timestamp

This was from v228, i.e. before cgroup v2 got introduced.
Nowadays cgroup v1 is outright rejected during initialization,
i.e. upgrading isn't possible whatsoever. Remove the compat glue there.

5 months agojournal: make journal_file_copy_entry() robust towards copying invalid/half-written...
Lennart Poettering [Wed, 4 Jun 2025 18:51:24 +0000 (20:51 +0200)] 
journal: make journal_file_copy_entry() robust towards copying invalid/half-written source journal files (#37732)

5 months agojournal-file: let's make journal_file_copy_entry() robust against concurrent writing... 37732/head
Lennart Poettering [Wed, 4 Jun 2025 15:00:29 +0000 (17:00 +0200)] 
journal-file: let's make journal_file_copy_entry() robust against concurrent writing of the source

As usual, we need to protect ourselves against concurrent modification
of journal files. We a pretty good at that these days when reading
journal files. But journal_file_copy_entry() so far wasn't too good with
that. journal_file_append_data() so far returned EINVAL when you pass
invalid data to it. Since we pass the source data as-is in there, it's
going to fail if the journal source file is slightly invalid due to a
concurrent update.

Hence, we need to validate data gracefully here that we think comes from
a safe place, because actually it doesn't, it's directly copied from an
unsafe journal file.

Hence, let's introduce a clear error code here, and look for it in
journal_file_copy_entry(), and handle it gracefully.

Pretty sure this fixes #33372, but it's a race, so I don't know for
sure. If this remains reproducible we need to look at this again.

Fixes: #33372
5 months agocompress: get rid of a bunch of 'else'
Lennart Poettering [Wed, 4 Jun 2025 15:00:21 +0000 (17:00 +0200)] 
compress: get rid of a bunch of 'else'

5 months agosd-login: port sd_peer_get_cgroup() to SO_PEERPIDFD 37728/head
Lennart Poettering [Wed, 4 Jun 2025 09:45:20 +0000 (11:45 +0200)] 
sd-login: port sd_peer_get_cgroup() to SO_PEERPIDFD

5 months agosd-login: place inner part of sd_login_monitor_new() by a table
Lennart Poettering [Wed, 4 Jun 2025 09:40:45 +0000 (11:40 +0200)] 
sd-login: place inner part of sd_login_monitor_new() by a table

5 months agosd-login: modernize return parameter handling
Lennart Poettering [Wed, 4 Jun 2025 09:38:40 +0000 (11:38 +0200)] 
sd-login: modernize return parameter handling

Let's rename the return parameters as "ret_xyz" systematically in
sd-login.

Also, let's make the return parameters systematically optional, like we
typically do these days. So far some where optional, other's weren't.
Let's clean this up.

5 months agotest-network: extend comments how to run the test
Yu Watanabe [Wed, 4 Jun 2025 15:22:14 +0000 (00:22 +0900)] 
test-network: extend comments how to run the test

5 months agoSeveral follow-ups for userdb lookup from udevd and networkd (#37719)
Yu Watanabe [Wed, 4 Jun 2025 14:32:24 +0000 (23:32 +0900)] 
Several follow-ups for userdb lookup from udevd and networkd (#37719)

5 months agoupdate TODO
Lennart Poettering [Wed, 4 Jun 2025 14:05:09 +0000 (16:05 +0200)] 
update TODO

5 months agodoc: tweaks to root storage daemon docs (#37727)
Yu Watanabe [Wed, 4 Jun 2025 13:34:28 +0000 (22:34 +0900)] 
doc: tweaks to root storage daemon docs (#37727)

5 months agoBugprone argument comment 9 (#37712)
Yu Watanabe [Wed, 4 Jun 2025 13:33:51 +0000 (22:33 +0900)] 
Bugprone argument comment 9 (#37712)

Follow up from https://github.com/systemd/systemd/pull/37678

5 months agocopy: return immediately on fs-verity failures
Allison Karlitskaya [Thu, 20 Mar 2025 12:13:13 +0000 (13:13 +0100)] 
copy: return immediately on fs-verity failures

Since 8065d02e263a ("copy: Fix error handling in fd_copy_directory()")
we immediately abort recursive copy operations on ENOSPC.  Let's also
abort on the common case of filesystems not supporting fs-verity: if
it's unsupported for one file, it's unlikely to work for the 1000s that
follow it.

We do this by mapping the two fs-verity "not supported" errors (ENOTTY,
EOPNOTSUPP) to ESOCKTNOSUPPORT as a special "fs-verity not supported
here" error.  When we see that error at the top level we exit
immediately.

This prevents us from having to see the same error message literally
thousands of time when using fsverity=copy with systemd-repart on a
filesystem which lacks the proper support.

Adjust the test-copy test case to expect the new errno.  Previously this
test case would output multiple failure lines per `copy_tree_at()`
invocation (for the failing cases) but now it only outputs one.

5 months agodoc: clarify that root storage daemons need unit files 37727/head
Lennart Poettering [Wed, 4 Jun 2025 12:50:11 +0000 (14:50 +0200)] 
doc: clarify that root storage daemons need unit files

Fixes: #37700
5 months agodoc: mention 'exitrd' term
Lennart Poettering [Wed, 4 Jun 2025 12:50:07 +0000 (14:50 +0200)] 
doc: mention 'exitrd' term

5 months agoRevert "github/mkosi: tentatively disable mkosi(opensuse) job" 37719/head
Yu Watanabe [Wed, 14 May 2025 16:46:16 +0000 (01:46 +0900)] 
Revert "github/mkosi: tentatively disable mkosi(opensuse) job"

This reverts commit 48a092afbb27b03daaeb2db938917eb98c82e366.

5 months agomkosi: install util-linux-systemd in SUSE
Luca Boccassi [Tue, 3 Jun 2025 17:54:52 +0000 (18:54 +0100)] 
mkosi: install util-linux-systemd in SUSE

Some tools (findmnt, logger, lsblk, lslogins) got moved to a
new util-linux-systemd package in Tumbleweed so install it explicitly

5 months agoTEST-17-UDEV: acquire SYS_UID_MAX/SYS_GID_MAX from userdbctl
Yu Watanabe [Tue, 3 Jun 2025 20:38:35 +0000 (05:38 +0900)] 
TEST-17-UDEV: acquire SYS_UID_MAX/SYS_GID_MAX from userdbctl

Suse build systemd with -Dsystem-uid-max=499 -Dsystem-gid-max=499,
and seems to not provide /etc/login.defs file. See
https://github.com/bmwiedemann/openSUSE/blob/2dc224ae5d446e928519315f4d46f76d1e34b8a8/packages/s/systemd/systemd.spec

5 months agonetwork: skip loading /etc/shadow
Yu Watanabe [Tue, 3 Jun 2025 20:29:16 +0000 (05:29 +0900)] 
network: skip loading /etc/shadow

We only require UID/GID, hence not necessary to load information from shadow.

5 months agoudev-rules: skip loading /etc/shadow
Yu Watanabe [Tue, 3 Jun 2025 20:27:34 +0000 (05:27 +0900)] 
udev-rules: skip loading /etc/shadow

We only require UID/GID, hence not necessary to load information from shadow.

5 months agouserdb: make ENOEXEC wins over ESRCH
Yu Watanabe [Wed, 4 Jun 2025 09:14:52 +0000 (18:14 +0900)] 
userdb: make ENOEXEC wins over ESRCH

Both ENOEXEC and ESRCH is a kind of error that indicate successful
lookup. ENOEXEC means the server found an entry but it does not
pass filter. ESRCH means the server could not find an entry.
Hence, ENOEXEC should have more information, and should be propagated to
the caller.

5 months agouserdb: use RET_GATHER() at one more place and update comment
Yu Watanabe [Wed, 4 Jun 2025 09:14:02 +0000 (18:14 +0900)] 
userdb: use RET_GATHER() at one more place and update comment

5 months agouserdb: fix definition of USERDB_SYNTHESIZE_NUMERIC
Yu Watanabe [Tue, 3 Jun 2025 20:20:21 +0000 (05:20 +0900)] 
userdb: fix definition of USERDB_SYNTHESIZE_NUMERIC

Otherwise, we always synthesize numeric IDs.

Follow-up for e4d07d1a2d66fd200abdd977b70fc6ac69a369ce.

5 months agoresolved: honour SD_RESOLVED_NO_CNAME flag when processing cache
Lennart Poettering [Wed, 4 Jun 2025 08:53:50 +0000 (10:53 +0200)] 
resolved: honour SD_RESOLVED_NO_CNAME flag when processing cache

Fixes: #33300
Replaces: #35102

5 months agotreewide: correct argument comments for sd_event_add_time 37712/head
Jelle van der Waa [Wed, 4 Jun 2025 09:24:21 +0000 (11:24 +0200)] 
treewide: correct argument comments for sd_event_add_time

5 months agotreewide: correct argument comments for sd_netlink_call
Jelle van der Waa [Wed, 4 Jun 2025 09:15:52 +0000 (11:15 +0200)] 
treewide: correct argument comments for sd_netlink_call

5 months agotreewide: correct argument comment to 'ret' where applicable
Jelle van der Waa [Tue, 3 Jun 2025 13:58:24 +0000 (15:58 +0200)] 
treewide: correct argument comment to 'ret' where applicable

For functions with one return argument prefer 'ret' as argument comment.

5 months agoask-password-api: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 13:37:30 +0000 (15:37 +0200)] 
ask-password-api: correct argument comment

5 months agoRevert "coredump: lock down EnterNamespace= mount even more"
Michal Sekletar [Fri, 14 Mar 2025 08:16:17 +0000 (09:16 +0100)] 
Revert "coredump: lock down EnterNamespace= mount even more"

This reverts commit 4c9c8b8d09eff18df71ba4aa910df4201f9890a0.

Reverted change broke EnterNamespace= completely. For example, libdw
tries to access libc in /lib64 which points to usr/lib64 and that fails.
Similarly for binaries, we need to be able to resolve /bin to usr/bin
and /sbin to usr/sbin at the very least.

5 months agorepart: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 13:32:49 +0000 (15:32 +0200)] 
repart: correct argument comment

5 months agonsresourced: correct argument comments
Jelle van der Waa [Tue, 3 Jun 2025 12:07:21 +0000 (14:07 +0200)] 
nsresourced: correct argument comments

5 months agosd-varlink: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 12:01:13 +0000 (14:01 +0200)] 
sd-varlink: correct argument comment

5 months agohomectl: rename 'emphasize_current' -> 'emphasize_current_password'
Jelle van der Waa [Tue, 3 Jun 2025 11:40:39 +0000 (13:40 +0200)] 
homectl: rename 'emphasize_current' -> 'emphasize_current_password'

Other functions in this file use the same parameter naming.

5 months agogenerator: rename 'password' -> 'key_file'
Jelle van der Waa [Tue, 3 Jun 2025 09:14:22 +0000 (11:14 +0200)] 
generator: rename 'password' -> 'key_file'

Makes the header declaration and implementation consistent.

5 months agocgroup-util: rename 'fsfd' -> 'cgroups_fd'
Jelle van der Waa [Tue, 3 Jun 2025 08:49:17 +0000 (10:49 +0200)] 
cgroup-util: rename 'fsfd' -> 'cgroups_fd'

Makes the header and implementation consistent.

5 months agoman/pcrlock: fix typo
Yu Watanabe [Wed, 4 Jun 2025 04:12:42 +0000 (13:12 +0900)] 
man/pcrlock: fix typo

Follow-up for ccd2bf48b2d736e335f217d5621a817aa1b6beeb.

5 months agouserdbctl: Label dynamic greeter users
Adrian Vovk [Fri, 30 May 2025 18:27:29 +0000 (14:27 -0400)] 
userdbctl: Label dynamic greeter users

5 months agodoc: fix integration tests guide reference
Emmanuel Ferdman [Mon, 2 Jun 2025 19:19:26 +0000 (12:19 -0700)] 
doc: fix integration tests guide reference

5 months agocore/varlink: use forward.h at two more places (#37716)
Mike Yuan [Tue, 3 Jun 2025 21:11:17 +0000 (23:11 +0200)] 
core/varlink: use forward.h at two more places (#37716)

5 months agocore/varlink: use forward.h at two more places 37716/head
Yu Watanabe [Tue, 3 Jun 2025 19:57:29 +0000 (04:57 +0900)] 
core/varlink: use forward.h at two more places

5 months agocompress: avoid a bunch of div-by-zeroes
Lennart Poettering [Tue, 3 Jun 2025 14:26:17 +0000 (16:26 +0200)] 
compress: avoid a bunch of div-by-zeroes

Follow-up for #37706. Implements the same logic for all compression
algorithms we have.

5 months agotpm2: various smaller fixes, mostly about better error messages and support checking...
Lennart Poettering [Tue, 3 Jun 2025 16:26:36 +0000 (18:26 +0200)] 
tpm2: various smaller fixes, mostly about better error messages and support checking (#37690)

Fixes: #35187
Fixes: #36743
Fixes: #37607
5 months agotpm2-util: guarantee that verb_has_tpm2_generic() returns usable exit status 37690/head
Lennart Poettering [Tue, 3 Jun 2025 14:11:57 +0000 (16:11 +0200)] 
tpm2-util: guarantee that verb_has_tpm2_generic() returns usable exit status

5 months agotpm2-util: use BIT_FOREACH() more
Lennart Poettering [Tue, 3 Jun 2025 14:11:35 +0000 (16:11 +0200)] 
tpm2-util: use BIT_FOREACH() more

5 months agotpm2: add a clear error message for all errors that suggest a PCR violation
Lennart Poettering [Mon, 2 Jun 2025 11:13:17 +0000 (13:13 +0200)] 
tpm2: add a clear error message for all errors that suggest a PCR violation

Fixes: #35187
5 months agotpm2-util: add a brief summary of tpm2_unseal() return values in a comment
Lennart Poettering [Mon, 2 Jun 2025 11:13:59 +0000 (13:13 +0200)] 
tpm2-util: add a brief summary of tpm2_unseal() return values in a comment

5 months agotpm2-util: also generate recognizable error if PolicyAuthorizeNV fails
Lennart Poettering [Mon, 2 Jun 2025 11:12:28 +0000 (13:12 +0200)] 
tpm2-util: also generate recognizable error if PolicyAuthorizeNV fails

5 months agopcrlock: also refuse lacking SHA-256 support early when creating policy
Lennart Poettering [Mon, 2 Jun 2025 10:32:33 +0000 (12:32 +0200)] 
pcrlock: also refuse lacking SHA-256 support early when creating policy

This will fail eventually, but let's be explicit early here.

5 months agopcrlock: make error messages more useful if PCR state doesn't match policy during...
Lennart Poettering [Mon, 2 Jun 2025 10:23:51 +0000 (12:23 +0200)] 
pcrlock: make error messages more useful if PCR state doesn't match policy during PolicyOR

Fixes: #35187
5 months agomeasure: generate a more useful error in case SHA1 support is disabled by distro
Lennart Poettering [Mon, 2 Jun 2025 09:49:33 +0000 (11:49 +0200)] 
measure: generate a more useful error in case SHA1 support is disabled by distro

Fixes: #36743
5 months agopcrlock: add "is-supported" verb that checks if the local TPM supports the commands...
Lennart Poettering [Mon, 2 Jun 2025 09:20:52 +0000 (11:20 +0200)] 
pcrlock: add "is-supported" verb that checks if the local TPM supports the commands we need for pcrlock

systemd-pcrlock requires support for the PolicyAuthorizeNV command,
which is not implemented in the first TPM2 releases. We also strictly
require SHA-256 support. Hence add a tool for checking for both of
these.

This is a tighter version of "systemd-analyze has-tpm2", that checks for
the precise feature that systemd-pcrlock needs, on top of basic TPM2
functionality.

Fixes: #37607
5 months agotpm2-util: correct copy/pasted error message
Lennart Poettering [Mon, 2 Jun 2025 11:13:34 +0000 (13:13 +0200)] 
tpm2-util: correct copy/pasted error message

5 months agobus-unit-util: warn and ignore assignment of deprecated properties
Yu Watanabe [Fri, 30 May 2025 19:30:43 +0000 (04:30 +0900)] 
bus-unit-util: warn and ignore assignment of deprecated properties

With 5da476ac7728b91ad3a49c1b126b3559b4fbeed8, we refused to set the
properties, but this relaxes the behavior, and now commands warn and
ignore the assignment.

Also, assignment of CPUAccounting property is now warned and ignored,
which is deprecated by 29da53dde32a0097134f6c3ba5fb5220dd6e5423.

Prompted by https://github.com/systemd/systemd/pull/37665#discussion_r2115676993

5 months agorepart: if partition already exists, required size may not be multiple of grain size
Yu Watanabe [Fri, 18 Apr 2025 18:41:45 +0000 (03:41 +0900)] 
repart: if partition already exists, required size may not be multiple of grain size

See partition_min_size_with_padding().
Fixes #37178.