Commit Graph
74677 Commits
Author SHA1 Message Date
Lennart Poettering d7afdf36ae ci: add test for importd varlink interface + import generator 2024-06-25 09:57:42 +02:00
Lennart Poettering 5f87b035fa import: add generator that synthesizes download jobs from kernel cmdline 2024-06-25 09:57:42 +02:00
Lennart Poettering f596658811 importd: allow activation in early boot, and make it socket activatable
Previously, importd was only accessible via D-Bus, which required it to
be a late boot service. Now that we have Varlink we can rearrange things
to become early-boot activated, just after the image directories are
mounted.

This will later allow us to have generator that auto-downloads images on
boot.
2024-06-25 09:57:42 +02:00
Lennart Poettering 17a6043a14 importd: add simple varlink API
For now, let's just support Pull() and ListTransfers(), but this is just
a start.
2024-06-25 09:57:42 +02:00
Lennart Poettering 71613cd59a import: add generic enum for choosing between tar + raw downloads 2024-06-25 09:49:26 +02:00
Lennart Poettering 05f47839e1 varlink: add varlink_many_*() helpers that send messages to a set of connections at once
If we have a Varlink interface that allows man subscribers to the same
source of events we typically want to notify all of them at once with
the same message.

Let's add some helpers for this purpose: varlink_many_*() can be used to
send messages, similar to the corresponding varlink_*() calls, but they
take a Set of Varlink objects and we issue the operation on every
connection once.

This ports over one existing case where this is beneficial, but the main
user for this is supposed to be importd later.
2024-06-25 09:49:26 +02:00
Lennart Poettering 953bddee2f Merge pull request #33461 from poettering/boot-measured-flag-rework
stub: rework how we combine the "measured" flags in sd-stub
2024-06-25 09:48:38 +02:00
Luca Boccassi 11a66a95ec Merge pull request #33454 from YHNdnzj/user-service-working-dir-relax
core: verify WorkingDirectory= is outside of API VFS only under mount namespacing
2024-06-25 00:48:37 +02:00
Lennart Poettering 2cadbc21ae stub: fix reporting of dtb measurement
Let's properly return the measurement flag tristate, rather than a
boolean. Otherwise we'll mistake "nothing to measure" as "not measured",
which are two different things, and means we'll miscombine the flag
later, claiming to userspace that we measured no dtb data even if there
was.
2024-06-24 22:43:45 +02:00
Lennart Poettering d0c441f99e stub: unify how we combine 'measured' flags
We have the same non-trivial ternary op expression at various places,
let's unify it in one call, to make this easier to read and remove
duplication.
2024-06-24 22:43:45 +02:00
Lennart Poettering ff8d08ab4e uefi: drop redundant local variable 2024-06-24 22:43:45 +02:00
Lennart Poettering 95340b33a4 uefi: drop ill-placed empty line
Let's not place empty lines between function calls and their immediate
error handling.
2024-06-24 22:38:24 +02:00
nerdopolis 952b26c75d login: Add a new SecureAttentionKey dbus signal when Ctrl+Alt+Shift+Esc is pressed 2024-06-24 22:29:38 +02:00
Yu Watanabe 956a9f00b4 test-execute: add a test case for issue #33299 2024-06-25 05:21:00 +09:00
Yu Watanabe 84b79215cc core: do not filter out write() if required in the very late stage
Before 12001b1bf0, write() is required for
if Type=exec. However, with the previous commit, now write() is also used
for sending handoff timestamp. Let's allow write() if necessary.

Fixes a regression caused by 12001b1bf0.
Fixes #33299.
2024-06-25 05:15:55 +09:00
Yu Watanabe 5161422bb5 core: use write() to send handoff timestamp
Before 12001b1bf0, the timestamp is sent
with write(), but the commit made the timestamp sent by send(), and
causes regressin #33299.

Note the invocation will still fail if write() is filtered by seccomp.
But, that is an old issue since Type=exec is introduced
(5686391b00).

Partially fixes a regression caused by 12001b1bf0.
Partially fixes #33299.
2024-06-25 05:14:57 +09:00
Yu Watanabe b89a262eb5 seccomp-util: split out seccomp_filter_set_add_by_name() 2024-06-25 05:14:53 +09:00
Luca Boccassi f8f06462e5 Merge pull request #33042 from poettering/machined-unpriv
machined: unprivileged machine registration
2024-06-24 20:45:37 +02:00
Luca Boccassi 9ca01a6475 Merge pull request #33000 from poettering/ssh-proxy-machine
systemd-ssh-proxy: look for VSOCK CIDs in machined
2024-06-24 20:35:07 +02:00
Yu Watanabe 08f333b9ff Merge pull request #33466 from YHNdnzj/open-file-graceful-log
core/exec-invoke: clean up OpenFile= logging
2024-06-25 03:26:04 +09:00
Eugeny Shcheglov 1750e30d23 Fix typo in CAP_BPF description (#33464)
description_good and description_bad are mixed up. Disabling CAP_BPF results in the inability to load BPF, not the other way around.
2024-06-25 03:23:50 +09:00
oldherl 341f04fa33 hwdb: fix keyboard of RedmiBook Pro 15 2022 (#33465)
Fix two problems of the keyboard of RedmiBook Pro 15 2022.
- Enter key in the main area was mapped to KP_Enter.
- When Fn is locked (to use F1-F12 without pressing Fn),
  Right Ctrl was mapped to Menu. Keeping it as Right Ctrl is more useful.
2024-06-25 03:22:37 +09:00
Yu Watanabe 62fb079a3b test-network: check if static routes not overridden by NDisc routes 2024-06-25 03:17:21 +09:00
Yu Watanabe fd436c8d67 network/ndisc: do not remove static routes when received RA with zero lifetime
Similar to the previous commit, but for preventing from removing static
routes on receiving RA with zero lifetime.

Fixes a regresson caused by 479d3e1994.
Fixes #33346.
2024-06-25 03:15:59 +09:00
Yu Watanabe 7af3e8cd00 network/ndisc: do not override conflicting static routes
We have already ignored conflicting address configurations requested by
NDisc protocol. See ndisc_request_address().
Let's follow the same rule for routes. That is, if there are conflicting
static routes configured or requested, do not override them by NDisc.

Also, swap the order of checking existing route and existing request.

Fixes a regression caused by 972f1d17ab.
Prompted by #33346.
2024-06-25 02:46:08 +09:00
Mike Yuan c24ac9b97b core/exec-invoke: clean up OpenFile= logging
Make collect_open_file_fds() the only logging function,
and downgrade various usual errors to debug level
if OPENFILE_GRACEFUL is set.

Fixes #33458
2024-06-24 18:31:38 +02:00
Mike Yuan b9c5d812d5 core/exec-invoke: reopen OpenFile= fds with O_NOCTTY 2024-06-24 18:31:36 +02:00
Lennart Poettering 21ab3f505a uefi: emphasize a bit that EV_IPL event logs is the past, EV_EVENT_TAG the future 2024-06-24 16:26:43 +02:00
Mike Yuan 276bd392ec core: verify WorkingDirectory= is outside of API VFS only under mount namespacing
The purpose of the check is to prevent leaking API VFS fds
from host into a mount namespace/container. When mountns
is not used at all, the check is pointless and causes
inconvenience. E.g. file managers might need to be spawned
under those directories, and they surely won't run in mountns.

Suggested in https://github.com/systemd/systemd/pull/33454#issuecomment-2186351467
Fixes #33361
2024-06-24 16:01:07 +02:00
Mike Yuan 453cb5d01e core/load-fragment: use ASSERT_PTR where appropriate 2024-06-24 15:35:56 +02:00
Mike Yuan c53580bf2e Merge pull request #33401 from yuwata/journal-revert-source-boottime-timestamp
journal: partially revert recent changes
2024-06-24 15:34:16 +02:00
Mike Yuan 28cb2803a2 Merge pull request #33456 from yuwata/terminal-util
terminal-util: use colon as separator for specifying color
2024-06-24 15:29:36 +02:00
Robin Lee 6efab8c343 vmspawn: define QEMU_MACHINE_TYPE for loongarch64
Use ["virt"](https://www.qemu.org/docs/master/system/loongarch/virt.html) as a commonly used generic platform on loongarch64.
2024-06-24 12:43:45 +02:00
Yu Watanabe c8210d98a4 terminal-util: several cleanups for ColorMode
- introduce or rename usual enum values _MAX and _INVALID,
- introduce and use string table lookup functions,
- split out implementation of get_color_mode() to _impl(),
- add tests for get_color_mode().
2024-06-24 17:57:07 +09:00
Yu Watanabe 5f0b72e53b terminal-util: merge COLOR_ON with COLOR_24BIT
Currently, we assume that there is no restriction on coloring when
COLOR_24BIT. Let's merge the two values.

Follow-up for a5efbf468c.
2024-06-24 17:57:07 +09:00
Yu Watanabe 6eabe9f2ff terminal-util: use colon as separator for specifying color
Then, terminal will safely ignore unsupported features, like colored
underline.

Fixes a regression caused by 891abc9cf1.
Fixes https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074073.
Fixes #33449.
2024-06-24 17:57:07 +09:00
Luca Boccassi 59a7019fee Merge pull request #33452 from bluca/repart_pkg
mkosi: install new split-out systemd packages
2024-06-23 13:19:30 +01:00
Luca Boccassi 8a91a43197 mkosi: bump Debian Salsa commit to latest 2024-06-23 10:20:27 +01:00
Luca Boccassi 621a7fe064 mkosi: install new split-out systemd packages
repart and cryptsetup tools were moved out of the main package
to reduce dependencies.
2024-06-23 10:18:10 +01:00
Mike Yuan eb37c0c078 bus-unit-util: add PrivateTmpEx to bus_append_execute_property()
Follow-up for 9d50d053f3
2024-06-23 06:43:14 +09:00
Stuart Hayhurst 5e717db67c hwdb: Fix Logitech G915 TKL (Bluetooth) appearing as a mouse 2024-06-23 06:41:58 +09:00
Diego Viola a78394a49a man: fix double is typo in systemd-tmpfiles
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-06-22 17:06:26 +09:00
Lennart Poettering 18eaff4272 tree-wide: fix type of read() return variable at a couple of places
read() returns ssize_t (i.e. 64bit typically). We assigned it to int
variables in some cases (i.e. 32bit typically). Let's not be so sloppy,
and not accidentally drop 32bit on the floor.

(of course, this is not an issue IRL since we'll not have allocations
above 2^32 ever we could read into, but still, let's clean this up)
2024-06-22 17:05:36 +09:00
Lennart Poettering 57b41f15e5 varlink: yet another fix around handling of IDL comments
Skip over them when validating a message against the IDL.

Add test case that tests this.
2024-06-22 17:03:17 +09:00
Yu Watanabe af6e88432f Merge pull request #33439 from YHNdnzj/private-tmp-followup
core: several follow-ups for recent changes to PrivateTmp
2024-06-22 16:34:55 +09:00
Yu Watanabe 5ab6845036 Merge pull request #33408 from poettering/install-change-fix
install: some follow-up fixes to #33254
2024-06-22 16:24:47 +09:00
Lennart Poettering d9a57a550b update TODO 2024-06-21 17:49:26 +02:00
Lennart Poettering ec67cc9785 units: register vmspawn VMs started via systemd-vmspawn@.service by default with machined 2024-06-21 17:49:26 +02:00
Lennart Poettering ecc4287dee vmspawn: by default, let machined register a cgroup for VMs
This mimics what we do in nspawn: if registration is enabled we'll let
machined allocate a scope unit for us. When --keep-unit is used we'll
register without creating a new scope.

This brings behaviour more inline with what nspawn does, exposing the
same sets of options.
2024-06-21 17:49:26 +02:00
Lennart Poettering e16be05858 nspawn: machine registration is now available unpriv 2024-06-21 17:38:23 +02:00