1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00
Commit Graph

61106 Commits

Author SHA1 Message Date
Lennart Poettering
3022916b4d sd-bus: handle -EINTR return from bus_poll()
In sd_bus_wait(), let's convert EINTR to a return code of 0, thus asking
the caller do loop again and enter sd_bus_process() again (which will
not find any queued events). This way we'll not return an error on
something that isn't really an error. This should typically make sure
things are properly handled by the caller, magically, without eating up
the event entirely, and still giving the caller time to run some code if
they want.
2022-11-22 13:06:50 +01:00
Lennart Poettering
108dfff2c7 tree-wide: modernizations with RET_NERRNO() 2022-11-22 13:05:29 +01:00
Anita Zhang
6ee27eb3ca man: update docs for MemoryZSwapMax= 2022-11-22 11:01:50 +01:00
Benjamin Fogle
f4a49d1c58 resolved: Fix OpenSSL error messages 2022-11-22 16:04:45 +09:00
Yu Watanabe
6ad17c31fb
Merge pull request #25470 from keszybz/strv-extendf-format
Improve check for strv_extendf() format string
2022-11-22 12:27:37 +09:00
наб
848517ddd4 systemctl: edit: write override files as text files
Instead of stripping the newline off the final would-be line;
continue to reduce an empty-line-only file to an empty file, though

Closes #25303
2022-11-22 01:45:50 +01:00
Zbigniew Jędrzejewski-Szmek
5a65d2e535 bootctl: use grey-and-slash prefix for source in list too
Follow-up for 7851732262. The source
field also shows a path relative to $BOOT, so it should be displayed
in the same fashion.
2022-11-22 01:40:20 +01:00
Lennart Poettering
e4cb147a2e udev: make sure auto-root logic also works in UKIs booted from XBOOTLDR
If no root= switch is specified on the kernel command line we'll use the
root disk on which the partition the LoaderDevicePartUUID efi var is
located – as long as that partition is an ESP. Let's slightly liberalize
that and also allow it if that partition is an XBOOTLDR partition. This
ensures that UKIs spawned directly from XBOOTLDR work the same as those
from the ESP.

(Note that this makes no difference if sd-boot is in the mix, as in that
case LoaderDevicePartUUID is always set to the ESP, as that's where
sd-boot is located, and sd-boot will set the var first, sd-stub will
only set it later if it#s not set yet.)
2022-11-22 01:32:51 +01:00
Lennart Poettering
7d1e61cab6 tree-wide: make constant ratelimit compound actually const
The compiler should recognize that these are constant expressions, but
let's better make this explicit, so that the linker can safely share the
initializations all over the place.
2022-11-22 01:30:55 +01:00
Jason A. Donenfeld
47b3e96647 boot: remove random-seed-mode
Now that the random seed is used on virtualized systems, there's no
point in having a random-seed-mode toggle switch. Let's just always
require it now, with the existing logic already being there to allow not
having it if EFI itself has an RNG. In other words, the logic for this
can now be automatic.
2022-11-22 01:30:03 +01:00
Luca Boccassi
a0c544ee09
Merge pull request #25379 from keszybz/update-doc-links
Update doc links
2022-11-22 01:07:13 +01:00
Zbigniew Jędrzejewski-Szmek
400102ec91 basic/strv: check printf arguments to strv_extendf()
The second argument to _printf_() specifies where the arguments start. We need to
use 0 in two cases: when the args in a va_list and can't be checked, and with journald
logging functions which accept multiple format strings with multiple argument sets,
which the _printf_ checker does not understand. But strv_extendf() can be checked.
2022-11-21 20:08:50 +01:00
Zbigniew Jędrzejewski-Szmek
6457ce15be manager: fix format strings for trigger metadata
Fixup for c8bc7519c8.
2022-11-21 20:08:50 +01:00
Yu Watanabe
69b31b29a0
Merge pull request #25395 from poettering/tpm2-dlsym-assert
dlfcn-util: add static asserts ensuring our sym_xyz() func ptrs match …
2022-11-22 03:36:03 +09:00
Lennart Poettering
0d9e6d76be mkosi: pull in libbpf1 instead of legacy libbpf0 on debian 2022-11-21 16:13:29 +01:00
Lennart Poettering
7736a71fd2 dlfcn-util: add static asserts ensuring our sym_xyz() func ptrs match the types from the official headers
Make sure that the sym_xyz function pointers have the types that the
functions we'll assign them have.

And of course, this found a number of incompatibilities right-away, in
particular in the bpf hookup.

(Doing this will trigger deprecation warnings from libbpf. I simply
turned them off locally now, since we are well aware of what we are
doing in that regard.)

There's one return type fix (bool → int), that actually matters I think,
as it might have created an incompatibility on some archs.
2022-11-21 16:13:17 +01:00
Lennart Poettering
28795f2c13 update TODO 2022-11-21 15:14:22 +01:00
Jason A. Donenfeld
a4eea6038c bootctl: install system token on virtualized systems
Removing the virtualization check might not be the worst thing in the
world, and would potentially get many, many more systems properly seeded
rather than not seeded. There are a few reasons to consider this:

- In most QEMU setups and most guides on how to setup QEMU, a separate
  pflash file is used for nvram variables, and this generally isn't
  copied around.

- We're now hashing in a timestamp, which should provide some level of
  differentiation, given that EFI_TIME has a nanoseconds field.

- The kernel itself will additionally hash in: a high resolution time
  stamp, a cycle counter, RDRAND output, the VMGENID uniquely
  identifying the virtual machine, any other seeds from the hypervisor
  (like from FDT or setup_data).

- During early boot, the RNG is reseeded quite frequently to account for
  the importance of early differentiation.

So maybe the mitigating factors make the actual feared problem
significantly less likely and therefore the pros of having file-based
seeding might outweigh the cons of weird misconfigured setups having a
hypothetical problem on first boot.
2022-11-21 15:13:26 +01:00
Daan De Meyer
261b14be76
Merge pull request #25461 from DaanDeMeyer/repart-followups
repart followups
2022-11-21 14:02:25 +01:00
Zbigniew Jędrzejewski-Szmek
2bd051a06d docs/BOOT_LOADER_INTERFACE: reword sentence to apply to both entry types 2022-11-21 12:26:35 +01:00
Zbigniew Jędrzejewski-Szmek
db81144428 tree-wide: BLS and DPS are now on uapi-group website 2022-11-21 12:26:35 +01:00
Daan De Meyer
6b1ea55e0b repart: Rework PartitionTarget initialization 2022-11-21 11:47:13 +01:00
Daan De Meyer
488bb758c0 repart: Use fd based operations in partition_populate_directory() 2022-11-21 11:47:13 +01:00
BerndAdameit
082ac7bb12 man/sd_bus_default: Refer to man-pages project (man7.org) for ssh(1) 2022-11-21 11:35:33 +01:00
Lennart Poettering
b22afd2844
Merge pull request #25409 from medhefgo/boot-fixes
boot: Several fixes
2022-11-21 11:34:50 +01:00
Daan De Meyer
48b1e18aae repart: Remove redundant parentheses in partition_populate_directory() 2022-11-21 10:53:23 +01:00
Daan De Meyer
a9abef7f67 mkfs-util: Use FORK_CLOSE_ALL_FDS 2022-11-21 10:51:15 +01:00
Daan De Meyer
92b11378ff mkfs-util: Prefer fd based stat() where possible 2022-11-21 10:49:37 +01:00
Daan De Meyer
29ec4bce0e mkfs-util: Use GID_FMT 2022-11-21 10:46:59 +01:00
Daan De Meyer
922576e452 repart: Use ASSERT_PTR() in partition_encrypt() 2022-11-21 10:45:26 +01:00
Daan De Meyer
983154f518 repart: Use ftruncate() instead of posix_allocate() 2022-11-21 10:44:38 +01:00
Daan De Meyer
766f52f25c repart: Fix parse_filter_partitions() log messages 2022-11-21 10:36:37 +01:00
Daan De Meyer
53538e33e9 repart: Fix FilterPartitionsType enum name 2022-11-21 10:35:18 +01:00
Daan De Meyer
5f59807d2d repart: Rework unused partition number algorithm 2022-11-21 10:34:28 +01:00
Daan De Meyer
c1979cd881 repart: Use IN_SET() in one more place 2022-11-21 10:28:36 +01:00
Richard E. van der Luit
214ba5cadf po: Translated using Weblate (Dutch)
Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Richard E. van der Luit <fedoraproject@veneax.nl>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/nl/
Translation: systemd/main
2022-11-21 00:43:55 +09:00
Jan Janssen
967a868563 boot: Replace firmware security hooks directly
For some firmware, replacing their own security arch instance with our
override using ReinstallProtocolInterface() is not enough as they will
not use it. This commit goes back to how this was done before by
directly modifying the security protocols.

Fixes: #25336
2022-11-19 16:39:04 +01:00
Jan Janssen
5489c13bae boot: Rework security arch override
This simplifies the caller interface for security arch overrides by only
having to pass a validator and an optional context.
2022-11-19 16:37:27 +01:00
Jan Janssen
679007044f boot: Manually convert filepaths if needed
The conversion of a filepath device path to text is needed for the stub
loader to find credential files.
2022-11-19 16:36:02 +01:00
Jan Janssen
af7ef648cd boot: Do not require a loaded image path
If the device path to text protocol is not available (looking angrily at
Apple) we would fail to boot because we cannot get the loaded image
path. As this is only used for cosmetic purposes, we can just silently
continue.

Fixes: #25363
2022-11-19 16:36:02 +01:00
Jan Janssen
b7b327f856 boot: Fix memory leak 2022-11-19 16:36:02 +01:00
lichao
eb263aabb0 remove obsolete translate in zh_CN.po 2022-11-19 23:51:39 +09:00
Yu Watanabe
da2e6df00a
Merge pull request #25438 from poettering/localhost-ifindex-tweak
resolved: fix ifindex for contacting per-interface DNS server if it is 127.0.0.1
2022-11-19 15:36:12 +09:00
Yu Watanabe
26627c088b
Merge pull request #25423 from yuwata/network-tc-cake-rtt-and-ack-filter
network: tc-cake: support controlling RTT and ACK filter
2022-11-19 15:35:49 +09:00
Mike Yuan
2d8cc7a7bb dbus-manager: add comments about booleans in function calls
Update to match the new coding style
See also: https://github.com/systemd/systemd/pull/25437#discussion_r1026934242
2022-11-19 14:34:08 +09:00
Yu Watanabe
77d5f36d93 test-network: add tests for RTT and ACK filter for CAKE 2022-11-19 07:08:26 +09:00
Yu Watanabe
8c92063633 network: tc-cake: add support to specify ACK filter 2022-11-19 07:08:22 +09:00
Yu Watanabe
8077dc9657
Merge pull request #25389 from fbuihuu/update-test-for-opensuse
Update test/ for openSUSE
2022-11-19 05:58:51 +09:00
Lennart Poettering
af1bed8e83 bootctl: rework how we handle referenced but absent EFI boot entries
Follow-up for #25368.

Let's consider ENOENT an expected error, and just debug log about it
(though, let's suffix it with `, ignoring.`). All other errors will log
loudly, as they are unexpected errors.
2022-11-19 05:27:50 +09:00
Lennart Poettering
6e32414a66 resolved: when configuring 127.0.0.1 as per-interface DNS server, contact it via "lo" always
ussually if you specify a DNS server on some interface then we'll use
that interface to talk to it. Let's override this for localhost
addresses, as they only really make sense on "lo".

Fixes: #25397
2022-11-18 16:54:46 +01:00