Yu Watanabe
356e9bc018
test-network: extend comments how to run the test
2025-06-04 16:46:41 +01:00
Yu Watanabe
b21483720c
Several follow-ups for userdb lookup from udevd and networkd ( #37719 )
2025-06-04 23:32:24 +09:00
Lennart Poettering
8e6ceee38b
update TODO
2025-06-04 16:28:52 +02:00
Yu Watanabe
ca783b43b8
doc: tweaks to root storage daemon docs ( #37727 )
2025-06-04 22:34:28 +09:00
Yu Watanabe
6e47959685
Bugprone argument comment 9 ( #37712 )
...
Follow up from https://github.com/systemd/systemd/pull/37678
2025-06-04 22:33:51 +09:00
Allison Karlitskaya
137a2b1208
copy: return immediately on fs-verity failures
...
Since 8065d02e26 ("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.
2025-06-04 22:32:52 +09:00
Lennart Poettering
d1bacb0b8d
doc: clarify that root storage daemons need unit files
...
Fixes : #37700
2025-06-04 15:07:34 +02:00
Lennart Poettering
59fe8d74b5
doc: mention 'exitrd' term
2025-06-04 15:07:34 +02:00
Yu Watanabe
a4dae8e42f
Revert "github/mkosi: tentatively disable mkosi(opensuse) job"
...
This reverts commit 48a092afbb .
2025-06-04 21:54:37 +09:00
Luca Boccassi
aba73b88a2
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
2025-06-04 21:54:37 +09:00
Yu Watanabe
d2b41bd69e
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
2025-06-04 21:54:32 +09:00
Yu Watanabe
b24e4f34cc
network: skip loading /etc/shadow
...
We only require UID/GID, hence not necessary to load information from shadow.
2025-06-04 21:50:12 +09:00
Yu Watanabe
8c57161d65
udev-rules: skip loading /etc/shadow
...
We only require UID/GID, hence not necessary to load information from shadow.
2025-06-04 21:50:12 +09:00
Yu Watanabe
937a355d6b
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.
2025-06-04 21:50:12 +09:00
Yu Watanabe
8bfcfa17fe
userdb: use RET_GATHER() at one more place and update comment
2025-06-04 21:50:12 +09:00
Yu Watanabe
bf4d6c3d51
userdb: fix definition of USERDB_SYNTHESIZE_NUMERIC
...
Otherwise, we always synthesize numeric IDs.
Follow-up for e4d07d1a2d .
2025-06-04 21:50:12 +09:00
Lennart Poettering
959d7f1759
resolved: honour SD_RESOLVED_NO_CNAME flag when processing cache
...
Fixes : #33300
Replaces: #35102
2025-06-04 12:52:11 +01:00
Jelle van der Waa
ac3a403486
treewide: correct argument comments for sd_event_add_time
2025-06-04 13:32:24 +02:00
Jelle van der Waa
095031683f
treewide: correct argument comments for sd_netlink_call
2025-06-04 13:32:24 +02:00
Jelle van der Waa
1cce9d930a
treewide: correct argument comment to 'ret' where applicable
...
For functions with one return argument prefer 'ret' as argument comment.
2025-06-04 13:32:24 +02:00
Jelle van der Waa
d7e986b7f0
ask-password-api: correct argument comment
2025-06-04 13:32:23 +02:00
Michal Sekletar
8f8148cb08
Revert "coredump: lock down EnterNamespace= mount even more"
...
This reverts commit 4c9c8b8d09 .
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.
2025-06-04 19:21:07 +09:00
Jelle van der Waa
2b58550bd4
repart: correct argument comment
2025-06-04 10:52:59 +02:00
Jelle van der Waa
7a4eb66ee5
nsresourced: correct argument comments
2025-06-04 10:52:59 +02:00
Jelle van der Waa
edffcc84f2
sd-varlink: correct argument comment
2025-06-04 10:52:59 +02:00
Jelle van der Waa
ca6cac2b2d
homectl: rename 'emphasize_current' -> 'emphasize_current_password'
...
Other functions in this file use the same parameter naming.
2025-06-04 10:45:54 +02:00
Jelle van der Waa
946aeac968
generator: rename 'password' -> 'key_file'
...
Makes the header declaration and implementation consistent.
2025-06-04 10:45:54 +02:00
Jelle van der Waa
93117b0fbd
cgroup-util: rename 'fsfd' -> 'cgroups_fd'
...
Makes the header and implementation consistent.
2025-06-04 10:45:54 +02:00
Yu Watanabe
b525942037
man/pcrlock: fix typo
...
Follow-up for ccd2bf48b2 .
2025-06-04 13:13:14 +09:00
Adrian Vovk
f2494757c3
userdbctl: Label dynamic greeter users
2025-06-04 12:16:27 +09:00
Emmanuel Ferdman
13a98f1f05
doc: fix integration tests guide reference
2025-06-04 07:29:16 +09:00
Mike Yuan
20ae3ec9b5
core/varlink: use forward.h at two more places ( #37716 )
2025-06-03 23:11:17 +02:00
Yu Watanabe
813fcf2a8a
core/varlink: use forward.h at two more places
2025-06-04 04:57:32 +09:00
Lennart Poettering
d483ac1d0d
compress: avoid a bunch of div-by-zeroes
...
Follow-up for #37706 . Implements the same logic for all compression
algorithms we have.
2025-06-03 18:27:02 +02:00
Lennart Poettering
a53b225c53
tpm2: various smaller fixes, mostly about better error messages and support checking ( #37690 )
...
Fixes : #35187
Fixes : #36743
Fixes : #37607
2025-06-03 18:26:36 +02:00
Lennart Poettering
9c335d2458
tpm2-util: guarantee that verb_has_tpm2_generic() returns usable exit status
2025-06-03 16:16:46 +02:00
Lennart Poettering
8756482804
tpm2-util: use BIT_FOREACH() more
2025-06-03 16:16:46 +02:00
Lennart Poettering
1e08f92250
tpm2: add a clear error message for all errors that suggest a PCR violation
...
Fixes : #35187
2025-06-03 16:16:46 +02:00
Lennart Poettering
8335765bb8
tpm2-util: add a brief summary of tpm2_unseal() return values in a comment
2025-06-03 16:15:34 +02:00
Lennart Poettering
f31a87331f
tpm2-util: also generate recognizable error if PolicyAuthorizeNV fails
2025-06-03 16:12:45 +02:00
Lennart Poettering
c7ce6fd30e
pcrlock: also refuse lacking SHA-256 support early when creating policy
...
This will fail eventually, but let's be explicit early here.
2025-06-03 16:12:45 +02:00
Lennart Poettering
3ab04fbc4c
pcrlock: make error messages more useful if PCR state doesn't match policy during PolicyOR
...
Fixes : #35187
2025-06-03 16:12:45 +02:00
Lennart Poettering
1144f07dc6
measure: generate a more useful error in case SHA1 support is disabled by distro
...
Fixes : #36743
2025-06-03 16:12:45 +02:00
Lennart Poettering
ccd2bf48b2
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
2025-06-03 16:12:45 +02:00
Lennart Poettering
d1c36f11d5
tpm2-util: correct copy/pasted error message
2025-06-03 16:05:25 +02:00
Yu Watanabe
add1bc28d3
bus-unit-util: warn and ignore assignment of deprecated properties
...
With 5da476ac77 , 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 29da53dde3 .
Prompted by https://github.com/systemd/systemd/pull/37665#discussion_r2115676993
2025-06-03 15:31:05 +02:00
Yu Watanabe
cb109e00c4
repart: if partition already exists, required size may not be multiple of grain size
...
See partition_min_size_with_padding().
Fixes #37178 .
2025-06-03 10:42:34 +02:00
Arian van Putten
96e481bfbd
vmspawn: do not preserve access permissions and xattrs of template OVMF vars
...
This makes vmspawn work when /usr/share/qemu/edk2-i386-vars.fd is on
disk with 0444 permissions as is the case on NixOS.
The nix package manager does not store any access permissions, ownership,
timestamps, or extended attributes in its package format to increase
reproducibility. The only meta-data that is stored is the executable bit.
Thus when unpacking a nix package, the executable bit is preserved, but no other
access permissions are preserved and all files in /nix/store end up as
read-only.
This causes the template OVMF vars file to have 0444 permissions. If we preserve
those permissions when copying the template file to /tmp that means QEMU can not
write to the file and fails.
So lets not preserve permissions and keep the 0600 permissions that are set by
default.
2025-06-03 11:26:52 +09:00
Daan De Meyer
3590802fe3
repart: Add ratelimitting for progress updates
...
Same logic as in systemd-import, this is especially important when
systemd-repart is not run from a tty as currently we'll get something
like this:
```
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
```
2025-06-03 11:16:09 +09:00
Daan De Meyer
66772511d6
repart: Improve logging in resolve_copy_blocks_auto()
2025-06-03 11:12:50 +09:00