Commit Graph
82069 Commits
Author SHA1 Message Date
Lennart Poettering 0f64d570cb repart: fix CopyBlocks=auto for verity-sig partitions, even harder (#37704)
@DaanDeMeyer, this is for you.

Seems to work great here to duplicate ParticleOS onto another disk.
2025-06-06 16:06:26 +02:00
Lennart Poettering 113006a1f3 tree-wide: basename -> path_extract_filename (#34906) 2025-06-06 15:53:28 +02:00
Lennart Poettering 6513646c62 repart: use partition_designator_is_verity_sig() + partition_designator_is_verity() more 2025-06-06 12:37:44 +02:00
Lennart Poettering d3a6606cea repart: try harder to find verity-sig partitions for CopyBlocks=auto
verity-sig partitions are not kernel concepts, hence dm-verity won't
link them for us from the slaves/ subdir in sysfs. Hence let's instead
look up the partition via udev's database.

Hence: when we search for the data+verity+verity-sig partitions then
search for the first two as usual, but search for the latter by looking
up the udev props on the first two, and then following the paths
provided therein.

Fixes: #34835
2025-06-06 12:37:44 +02:00
Lennart Poettering 188467dfd9 udev: add udev properties that point to verity/verity sig metadata partitions from data partitions
This extends the dissect_image builtin to actually add device node
references to the device nodes where the associated data is placed, if
we can find it.

This is kept very generic, and independent from the roothash properties
and suchlike, since it makes sense to make it possible to set these
properties also independently of the dissect-image builtin.

The device path is a /dev/disk/by-diskseq/ symlink, so that we have
stable reference that are not subject to dev_t reuses.
2025-06-06 12:37:41 +02:00
Lennart Poettering 870d6da909 gpt: add partition_designator_is_verity() helper
And rework partition_designator_is_verity_sig() to be based on
partition_verity_sig_to_data(), so that we don't have to maintain two
lists of verity sig partition types.
2025-06-06 12:37:20 +02:00
Yu Watanabe f2a8cc943d sd-lldp-rx: add VLAN ID parsing (#37725)
While the `port_vlan_id` field was already present in the
`sd_lldp_neighbor`, it wasn't currently parsed from the LLDP packet.
Added support for that as well as a small parsing test.

Closes #28354.
2025-06-06 19:12:48 +09:00
Yu Watanabe b1bfa60254 TODO: drop completed entry 2025-06-06 19:09:49 +09:00
Yu Watanabe 44875628ff systemctl: replace basename() with path_extract_filename() 2025-06-06 19:06:48 +09:00
Yu Watanabe 59829bb37a delta: rework how enumerate files 2025-06-06 19:06:48 +09:00
A. Wilcox 6b783209a8 tree-wide: basename -> path_extract_filename 2025-06-06 19:06:48 +09:00
Lennart Poettering ee96d65e50 update TODO 2025-06-06 12:03:16 +02:00
Lennart Poettering f7a79c7c43 generator: improve scope check (#37761)
Fixes: #35723
2025-06-06 12:02:25 +02:00
Lorenzo Arena 6b78f13b7e network: test-lldp-rx: set more variable as static const 2025-06-06 09:35:11 +02:00
Lorenzo Arena 496b21ab8e sd-lldp-rx: add VLAN ID parsing
Closes #28354.
2025-06-06 09:35:11 +02:00
Lennart Poettering da12ce285b generator: check $SYSTEMD_SCOPE rather than cgroup membership
This is more explicit and ensures that even in testing environments we
operate the same way.

As side effect it also avoids the mess around SELinux blocking access to
cgroupfs.

Fixes: #35723
2025-06-06 09:04:45 +02:00
Lennart Poettering d65dc4c593 core: break lines in some overly long function calls 2025-06-06 09:04:45 +02:00
Lennart Poettering 1de31f23a0 conf-files: use proper enum for flags parameters 2025-06-06 09:04:38 +02:00
Lennart Poettering aab61a4ebc journal: concurrent update fixes (#37757)
Fixes: #35229 #32436
2025-06-06 08:24:16 +02:00
Yu Watanabe eefcf8de64 core: adding CGroup for io.systemd.Unit.List (second PR) (#37646)
This PR adds CGroup context/runtime for io.systemd.Unit.List method.

This is follow up for https://github.com/systemd/systemd/pull/37432.
2025-06-06 06:07:35 +09:00
Yu Watanabe 3b1850d906 Bugprone argument comment 10 (#37755)
Follow up from https://github.com/systemd/systemd/pull/37712
2025-06-06 06:07:05 +09:00
Lennart Poettering 5ee8b3edb3 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
2025-06-05 22:31:41 +02:00
Lennart Poettering 813facd3ba journal: add 'const' at one more place 2025-06-05 22:31:40 +02:00
Lennart Poettering b16cb30edd 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.
2025-06-05 22:31:39 +02:00
Lennart Poettering 7d52a60843 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).
2025-06-05 22:31:21 +02:00
Mike Yuan 29d1082002 core/varlink: split out dynamic-user stuff into its own source files 2025-06-06 04:31:42 +09:00
SoloSaravanan 4344ef73a0 hwdb: Acer Nitro ANV15-51 Mic Toggle 2025-06-05 18:43:45 +01:00
Lennart Poettering 9ace4f1c30 mountfsd: support processing block devices with MountImage() (#37746)
Fixes: #35111
2025-06-05 16:51:06 +02:00
Daan De Meyer fdbfda7245 core: Various fixes for cgroup and pid namespaces (#36815) 2025-06-05 15:21:59 +02:00
Daan De Meyer a292b55980 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.
2025-06-05 15:18:30 +02:00
Lennart Poettering c91f1a3db8 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
2025-06-05 14:10:32 +01:00
Daan De Meyer d1ee3889cf 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.
2025-06-05 14:51:03 +02:00
Lennart Poettering 6315106268 add CITATION.cff file
As per spec: https://citation-file-format.github.io/

Fixes: #35260
2025-06-05 14:39:20 +02:00
Lennart Poettering c882e7f124 mountfsd: slightly relax check on image fds
Fixes: #35111
2025-06-05 14:28:33 +02:00
Lennart Poettering 01e82dfa96 dissect-image: port to varlink_callbo_and_log() 2025-06-05 14:28:31 +02:00
Lennart Poettering a589e1bd9e varlink-util: format system errors via %m in varlink_call_and_log()
This kinda does what bee59ab901 did for
varlinkctl also for the generic varlink_call_and_log() handler.
2025-06-05 14:28:14 +02:00
Lennart Poettering 4bd37b94b8 fixes for --machine= handling in run0 and journalctl (#37741)
Fixes: #32997
2025-06-05 14:02:26 +02:00
Lennart Poettering 6d83b6afbb resolvectl: --raw improvements (#37743)
Fixes: #37737
2025-06-05 14:02:00 +02:00
Ivan Kruglov 8006ab9047 core: adding CGroup runtime for io.systemd.Unit.List 2025-06-05 04:05:05 -07:00
Ivan Kruglov dffde7708a core: adding CGroup context for io.systemd.Unit.List 2025-06-05 04:05:05 -07:00
Ivan Kruglov 27a10f4f2a core: *ret = NULL for early return in unit_mounts_for_build_json() 2025-06-05 03:59:36 -07:00
Mike Yuan 199ccd70f6 core: rework how we track cgroup realized state (#37733) 2025-06-05 12:56:31 +02:00
Lennart Poettering 79226d797d 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.
2025-06-05 12:49:42 +02:00
Lennart Poettering 2ae32e9d8f sd-bus: port to split_user_at_host() 2025-06-05 12:49:35 +02:00
Lennart Poettering 137a8ce14d 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
2025-06-05 12:49:35 +02:00
Lennart Poettering 994a42a096 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
2025-06-05 12:45:37 +02:00
Lennart Poettering 020d6c1dce 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.
2025-06-05 12:44:08 +02:00
Lennart Poettering 4295c0db5f 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=.
2025-06-05 12:44:08 +02:00
Lennart Poettering 231a0417cd resolvectl: improve error message if we do not support dumping payload of RR 2025-06-05 12:43:36 +02:00
Lennart Poettering 317054365e 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
2025-06-05 12:38:28 +02:00