Commit Graph
86591 Commits
Author SHA1 Message Date
Yu Watanabe e94c410e51 man: fix typo
Follow-up for eb581ff6d9.
2026-02-20 01:18:54 +09:00
Yu Watanabe fcf5f1db94 mstack: fix typo
Follow-up for 8343032a86.
2026-02-20 01:14:30 +09:00
Yu Watanabe 5d01b27ffc import: fix typo
Follow-up for a9f6ba0496.
2026-02-20 01:13:02 +09:00
Yu Watanabe 9bc3c2e54a TODO: fix typo
Follow-up for 3bbada87e2.
2026-02-20 01:11:30 +09:00
Lennart Poettering 0036d62e6e importd: add support for downloading OCI images (#39621)
This adds the ability to download OCI images via importd. 

Not a fan of the OCI format tbh, in particular its security properties
are a bit sad. But I guess it exists and is very popular, hence we might
as well add support for it, even if it comes at much weaker security
properties than DDIs.

Fixes #36447
2026-02-19 16:43:11 +01:00
Lennart Poettering d911ca8454 Bring Bash profile for reporting context via Operating System Commands (OSC) into compliance with specifications (#40696)
This script fails to comply with the spec it's designed to implement,
[UAPI.15 OSC 3008: Hierarchical Context
Signalling](https://uapi-group.org/specifications/specs/osc_context/),
and fails the correctly utilize the specs provided by
[POSIX.1-2024](https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/mindex.html)
and [man 1
bash](https://www.man7.org/linux/man-pages//man1/bash.1.html); improve
compliance.

Changes are made in small atomic commits, with more detailed
descriptions of the work done in each message.
2026-02-19 15:50:24 +01:00
Yaping Li b0fba6abd3 metrics: fix casing for metrics names (take 2)
Change the casing for metrics names to mimic properties exposed via
varlink/dbus: Use PascalCase.
2026-02-19 15:30:18 +01:00
Daan De Meyer b6bdd540f9 machine: Fix cid passed to machine_add_from_params()
The default value is VMADDR_CID_ANY, not zero.
2026-02-19 15:17:10 +01:00
Lennart Poettering 3bbada87e2 update TODO 2026-02-19 15:08:20 +01:00
Lennart Poettering c86a72af04 ci: drop 'Ex' suffix from transient props
The "Ex" is mostly internal, and our parsers will append it
automatically when needed
2026-02-19 15:08:20 +01:00
Lennart Poettering e31ee582fc ci: add test for OCI downloading 2026-02-19 15:08:20 +01:00
Lennart Poettering eb581ff6d9 man: document everything we just added 2026-02-19 15:08:20 +01:00
Lennart Poettering cab2caa170 mountpoint-util: fix typo in comment 2026-02-19 15:08:20 +01:00
Lennart Poettering 6ebaea6990 portable: fix log levels
portable_extract_by_path() and install_image() can't agree whether to be
of the "logging" or "non-logging" kind
2026-02-19 15:08:20 +01:00
Lennart Poettering 968f3ebd20 discover-image: make sure we can remove mstacks 2026-02-19 15:08:20 +01:00
Lennart Poettering e93fd71094 core: introduce PinnedResource
This introduces PinnedResources as a structure combining pinned
references to a root directory, root image, or root mstack. This is not
only easier to work with, but essential to make certain unpriv things
work, as we need some mechanism to pin resources before we drop into a
userns which might possibly not provide access anymore to those
resources.

Hence this does two things: introduce the new structure, and immediately
hook it up so that we pin things properly before dropping into userns,
and then makes use of this after dropping the right way, and enables
unpriv userns operation.

The concept is generic enough to eventually implement extension images +
mount images with the same structure, but in order to keep the changes
managable this is left for another time.

(This also makes one further clean-up: client-side verity-reuse checks
are moved server side if we are unpriv. Previously we'd do them client
side, but they were doomed to fail because of lack of privs. Hence let's
drop the client side if we are unpriv and purely do them server-side in
that case.)
2026-02-19 15:08:20 +01:00
Lennart Poettering 68ed4f3c66 mountfsd,nsresource: allow recycling mountfsd/nsresourced client connections
So far we opened a new Varlink connection for every mountfsd/nsresourced
method call. Given each tool only does a very small number of calls
(usually 1…5) on them and the connections are cheap this is not too
wasteful. Nonetheless, let's do something about it, and allow reusing
the connection for multiple calls.

This not only makes things a bit more efficient, but has one more
important benefit: Varlink connections pin the security context of the
client when connecting. This means that varlink method calls done with a
connection established while some code was privileged will still operate
as privieged once privs are dropped, until the connection is closed.
This pinning effect is really nice, as it gives us behaviour in a
"capability system" like scheme. Later code is going to use that to
continue doing certain priv userns ops even after unsharing userns and
becoming fully unpriv.
2026-02-19 15:08:19 +01:00
Lennart Poettering fe487d3670 namespace: extend bind mount ignore field to permission issues
A later commit will add transient allocation of user namespaces with
dynamic UID range assignment. That creates certain permission issues.
Let's hence allow them to be handled gracefully in case the 'ignore'
field is set for a mount.
2026-02-19 15:07:19 +01:00
Lennart Poettering 26f80a9d33 namespace: port mount_private_apivfs() to fsopen() and friends
This is not just refactoring, but has the big benefit that it makes us
indepdendent from a temporary directory we might not have enough access
to create. (This matters with the new PrivateUsers=managed).
2026-02-19 15:07:19 +01:00
Lennart Poettering 051dfed9b6 private 2026-02-19 15:07:18 +01:00
Lennart Poettering 6b22ac31af core: add PrivateUsers=managed 2026-02-19 15:05:15 +01:00
Lennart Poettering fbaf05bfeb importctl: add 'pull-oci' client API 2026-02-19 15:05:15 +01:00
Lennart Poettering 9628a5ced4 importd: add bus/varlink api for downloading OCIs 2026-02-19 15:05:15 +01:00
Lennart Poettering fe1f8c1acd run: support RootMStack= on the client side for systemd-run 2026-02-19 15:05:15 +01:00
Lennart Poettering 38e65b6e4c portable: support .mstack images 2026-02-19 15:05:15 +01:00
Lennart Poettering 32b88dd25a pid1: introduce RootMStack= for using an mstack as root dir for a service 2026-02-19 15:05:15 +01:00
Lennart Poettering 116394f7ce tree-wide: move logging from varlink clients in nsresource.c/dissect-image.c into callers
These calls are "library-like", hence better should only debug log on
their own, not more.
2026-02-19 15:05:15 +01:00
Lennart Poettering 1bc237dd7a nspawn: add support for running mstack container images 2026-02-19 15:05:15 +01:00
Lennart Poettering 8cd29712cb discover-image: add support for discovering mstack images 2026-02-19 15:05:15 +01:00
Lennart Poettering 8187cd18d6 add mstack tool for accessing mstacks from the command line 2026-02-19 15:05:15 +01:00
Lennart Poettering 944161d0d4 vpick: add generic definition for mstack image pick filters 2026-02-19 15:05:15 +01:00
Lennart Poettering 8343032a86 mstack: introduce "mstack" concept 2026-02-19 15:05:15 +01:00
Lennart Poettering a9f6ba0496 pull: add OCI support 2026-02-19 15:05:15 +01:00
Lennart Poettering 087f2ec344 core: introduce exec_context_with_rootfs_strict() as a stricter version of exec_context_with_rootfs()
We have two very similar checks in place: in some contexts we want to
know if *any* RootDirectory= is configured, in the other we want to
suppress if it is configured to our regular root. Let's add a helper for
both (even if we only need it once), to make the mirrored behaviour
clear.
2026-02-19 15:05:15 +01:00
Lennart Poettering 6d327e9fdd core: use exec_context_with_rootfs() at one more place 2026-02-19 15:05:15 +01:00
Lennart Poettering 6527861039 tar-util: add support for extracting OCI compatible whiteouts, and turn them into overlayfs whiteouts 2026-02-19 15:05:15 +01:00
Lennart Poettering d66e3cc79a pull-job: make sure pull_job_restart() can be used to fetch the same resource again, just with new headers
Let's flush out all response state from the job, but let's keep the
request data previously configured, in particular the headers set. This
is useful to re-request a resource, just with a slightly modified or
identical URL.
2026-02-19 15:05:15 +01:00
Lennart Poettering 93915ec17a pull-job: add helpers to detect requests for authentication, and accept bearer tokens 2026-02-19 15:05:14 +01:00
Lennart Poettering 1f593d2b5e pull-job: add 'description' field to PullJob
This is shown in the output in place of the URL if non-NULL. This is
useful for OCI's hash-based URLs, which alone are very opaque to read.
2026-02-19 15:05:14 +01:00
Lennart Poettering 98b714e0cb pull-job: optionally free userdata when we destroy a PullJob 2026-02-19 15:05:14 +01:00
Lennart Poettering 4a886d9ab4 pull-job: add interface for controlling Accept: header sent to http server 2026-02-19 15:05:14 +01:00
Lennart Poettering 41b0c68760 pull-job: keep track of content type reported by server 2026-02-19 15:05:14 +01:00
Lennart Poettering dbf13060e1 uid-range: add uid_range_base() that returns the lowest entry 2026-02-19 15:05:14 +01:00
Lennart Poettering 4c701125df basic: define Architecture typedef in basic-forward.h 2026-02-19 15:05:14 +01:00
Carolina Jubran 1e6854e112 udev: grant read access to PTP devices for unprivileged users
Change the default udev rule for /dev/ptp* from 0660 to 0664,
allowing unprivileged users read-only access.

NIC telemetry and hardware logs often use device timestamps that must
be correlated with host time via read-only PTP ioctls (e.g.
cross-timestamp queries). Requiring privileged access makes these
workflows unnecessarily restrictive.

Older kernels lacked proper permission checks in some PTP ioctls.
Kernel commit b4e53b15c04e3852949003752f48f7a14ae39e86 ("ptp: Add PHC
file mode checks. Allow RO adjtime() without FMODE_WRITE.") introduces
the necessary file mode validation, ensuring that read access does not
permit clock modification or configuration changes, which still require
write permissions.

This commit has been backported to all actively maintained stable
kernel branches.

Related to #31034
2026-02-19 14:51:12 +01:00
Yu Watanabe dbc83d6353 NEWS: mention python requirement bump 2026-02-19 22:23:04 +09:00
Kai Lüke bad16f324a openssl-util: pass the UI callback for interactive PIN prompts
Observed with the tpm2 provider and the tpm2tss engine was that the
auth process failed because the provider/engine could not ask for the
PIN through the callback, resulting in:
  "Failed to load private key from ...: Input/output error"
Apparently the default UI method is not enough and the key setup
functions expect an explicit method.
Pass the existing UI method through as callback for the key setup.
2026-02-19 10:21:01 +01:00
Dmytro Bagrii 8df975bb67 xorg/50-systemd-user: import XAUTHORITY only if set
The warning will still be reported if XAUTHORITY is set but not exported.
However, such scenario is unlikely for xinitrc.d scripts environment.

Fixes #40745

Signed-off-by: Dmytro Bagrii <dimich.dmb@gmail.com>
2026-02-19 08:15:33 +01:00
Oblivionsage b3a2444ba5 pe-binary: wrap remaining LE fields with byte-swap macros
Follow-up to 02cab70acf. pe_hash(),
section_offset_cmp() and uki_hash() still had a bunch of raw accesses
to LE fields (e_lfanew, SizeOfHeaders, PointerToRawData, SizeOfRawData,
VirtualSize, certificate_table->Size) without le32toh(), so they'd
produce garbage on big-endian.

Also wrap VirtualSize in bootspec.c for consistency.
2026-02-19 07:34:44 +09:00
Daan De Meyer 81cef494a6 vpick: Make suffix a single string again instead of a strv
This was made a strv to handle either directories or raw images but
since we now handle that via multiple PickFilter instances, we don't
need suffixes to be a strv anymore.
2026-02-18 23:14:11 +01:00