1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-11 20:58:27 +03:00

75387 Commits

Author SHA1 Message Date
Daan De Meyer
3de13e6148 exec-credential: Skip duplicate credentials in load_credential_glob()
We document that when multiple credentials of the same name are found,
we use the first one found so let's actually implement that behavior.
2024-07-31 15:23:45 +02:00
Daan De Meyer
590348e2bf exec-credential: Log if we skip duplicate credential 2024-07-31 15:23:45 +02:00
Daan De Meyer
2c2ed3272b Drop EEXIST handling in load_credential_glob()
Credentials are written to a temporary file and renamed to the
destination with renameat() which will replace existing files so
EEXIST should not happen so drop the handling for EEXIST.
2024-07-31 15:23:45 +02:00
Daan De Meyer
5551426785
Merge pull request #33884 from DaanDeMeyer/log-context
log: Fix size calculation for number of iovecs
2024-07-31 14:23:08 +02:00
Daan De Meyer
9ce964d55b
Merge pull request #33882 from bluca/efi_proto_fallback_memory
stub: allocate and zero enough space in legacy x86 handover protocol
2024-07-31 13:46:41 +02:00
Daan De Meyer
fc83ff3f55 log: Fix size calculation for number of iovecs
Each log context field can expand to up to three iovecs (key, value
and newline) so let's fix the size calculation to take this into
account.
2024-07-31 13:12:55 +02:00
Daan De Meyer
7881f485c9 execute: Drop log level to unit log level in exec_spawn()
All messages logged from exec_spawn() are attributed to the unit
and as such we should set the log level to the unit's max log level
for the duration of the function.
2024-07-31 13:12:55 +02:00
Yu Watanabe
175cdefd33 man: suggest to enable global IPv6Forwarding= setting to make IPv6 packets forwarded
Closes #33414.
2024-07-31 09:53:18 +02:00
Yu Watanabe
acda1b3f2a NEWS: mention that udevadm test and test-builtin are now non-destructive
Follow-up for 089bef66316e5bdc91b9984148e5a6455449c1da.
Prompted by https://github.com/systemd/systemd/issues/33619#issuecomment-2257576579.
2024-07-31 10:06:25 +09:00
Yu Watanabe
dd87ad8e19 network: mention that IPv4 ACD is enabled by default for 169.254.0.0/16
Prompted by #33824.
2024-07-31 10:06:25 +09:00
Yu Watanabe
e2becab085 network: request non-NULL SSID when a wlan interface is configured as station
To avoid conflicts with user .network file for the wlan interface with Bond=.
See https://github.com/systemd/systemd/issues/19832#issuecomment-857661200.
2024-07-31 10:06:04 +09:00
Yu Watanabe
6d0cdbe0bc
Merge pull request #33878 from yuwata/network-bind-carrier
network: several cleanups for BindCarrier= setting
2024-07-31 10:05:43 +09:00
Yu Watanabe
356f25ab85
Merge pull request #33875 from yuwata/network-link-get-address
network: several fixlets related to link_get_address()
2024-07-31 10:05:11 +09:00
Luca Boccassi
4d6ab7e844 efi: fix link to legacy EFI handover protocol 2024-07-31 01:46:58 +01:00
Luca Boccassi
19812661f1 stub: allocate and zero enough space in legacy x86 handover protocol
A PE image's memory footprint might be larger than its file size due
to uninitialized memory sections. Normally all PE headers should be
parsed to check the actual required size, but the legacy EFI handover
protocol is only used for x86 Linux bzImages, so we know only the last
section will require extra memory. Use SizeOfImage from the PE header
and if it is larger than the file size, allocate and zero extra memory
before using it.

Fixes https://github.com/systemd/systemd/issues/33816
2024-07-31 01:46:25 +01:00
Yu Watanabe
ba7c4bd6f2 network: shorten code a bit 2024-07-31 06:47:33 +09:00
Yu Watanabe
36b8ad085c network: call link_handle_bound_by_list() before trying to reconfigure interface
Otherwise, when an interface gained its carrier, the interface may not
have matching .network file yet, then link_reconfigure_impl() returns
zero, and link_handle_bound_by_list() is skipped.

Fixes #33837.
2024-07-31 06:47:11 +09:00
Ivan Shapovalov
7767896d12 Revert "network/ndisc: ignore most fields of RA header when lifetime is zero"
This reverts commit ffef01acddcac27caaef02f7f28bff03d7799e5e.

Similar to 2d393b1b6d8 ("network: IPv6 Compliance: Router Advertisement
Processing, Reachable Time [v6LC.2.2.15]"),

Extract from: https://www.ietf.org/rfc/rfc4861.html#section-4.2, p.21,
first paragraph:

    The Router Lifetime applies only to
    the router's usefulness as a default router; it
    does not apply to information contained in other
    message fields or options.

So it does not make sense to prevent DHCPv6 when Router Lifetime is 0.

Fixes #33357.
2024-07-30 22:42:56 +02:00
Daniel P. Berrangé
9d7be044ca Fix detection of TDX confidential VM on Azure platform
The original CVM detection logic for TDX assumes that the guest can see
the standard TDX CPUID leaf. This was true in Azure when this code was
originally written, however, current Azure now blocks that leaf in the
paravisor. Instead it is required to use the same Azure specific CPUID
leaf that is used for SEV-SNP detection, which reports the VM isolation
type.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-07-30 22:39:20 +02:00
Yu Watanabe
f320c0777a test-network: add test case for preferred source with peer
For issue #31950.
2024-07-31 05:36:14 +09:00
Yu Watanabe
56f91e2d0b network: make link_get_address() provide matching address with peer
As all callers do not care if the address has peer address.
This also drops prefixlen argument as it is always zero.

Fixes a bug introduced by 42f8b6a80878e688b821adfb315c0a1f0a7076ce.
Fixes #31950.
2024-07-31 05:36:14 +09:00
Yu Watanabe
d9ef1cc407 network/ipv4acd: manage ACD engines with Address object
IPv4 addresses are managed with local and peer addresses and prefix
length. So, potentially, the same address with different prefix length
can be assigned on a link, e.g. 192.168.0.1/24 and 192.168.0.1/26.
If one of the address is configured with ACD but the other is not,
then previously ACD might be unexpectedly disabled or enabled on them,
as we managed ACD engines with only local addresses.

This makes ACD engines managed with the corresponding Address objects.
2024-07-31 05:35:20 +09:00
Yu Watanabe
e8eaed0240 network: do not bring down bound interfaces immediately
Even if a timespan specified to IgnoreCarrierLoss= for an interface,
when the carrier of the interface lost, bound interfaces might be bring
down immediately.

Let's also postpone bringing down bound interfaces with the specified
timespan.
2024-07-31 05:27:19 +09:00
Arian van Putten
a55d1b29a4
document how TimeoutStartSec= affects notify-reload (#33653)
* document how TimeoutStartSec=  affects notify-reload
2024-07-30 12:35:52 +01:00
Yu Watanabe
1bfa47418e nspawn: remove macvlan interfaces before network namespace died
This is similar to what we do for veth interfaces in remove_veth_links().

When a container rebooted, macvlan interfaces created by the previous
boot may still exist in the kernel, and that causes -EADDRINUSE after
reboot.

Hopefully fixes #680.
2024-07-30 12:38:50 +02:00
Daan De Meyer
b56920e36c kernel-install: Try some more initrd variants in 90-loaderentry.install
On CentOS/Fedora, dracut is configured to write the initrd to
/boot/initramfs-$KERNEL_VERSION...img so let's check for that as well
if no initrds were supplied.
2024-07-29 18:57:43 +02:00
Daan De Meyer
35c01ec59e kernel-install: Only read cmdline from /proc/cmdline when not in container
If we're running from within a container, we're very likely not going
to want to use the kernel command line from /proc/cmdline, so let's add
a check to see if we're running from a container to decide whether we'll
use the kernel command line from /proc/cmdline.
2024-07-29 18:56:30 +02:00
Daan De Meyer
7fe0ea2ead
Merge pull request #33857 from DaanDeMeyer/mkosi
Two small improvements
2024-07-29 15:40:48 +02:00
Daan De Meyer
ecfdecfd6a docs: Simplify hacking instructions a bit
We enable RuntimeBuildSources=yes by default so let's drop it from
the documentation.
2024-07-29 13:42:28 +02:00
Daan De Meyer
578ee05155 test: Don't mount build sources into image when running non-interactively 2024-07-29 13:40:42 +02:00
Martin Srebotnjak
be2ad93af3 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-29 10:16:40 +01:00
Luca Boccassi
0fa53f5dd7
Merge pull request #33853 from NickCao/l3mdev
network: Fixup Table when L3MasterDevice is set on routing policy rule
2024-07-29 10:15:52 +01:00
Nick Cao
615af2c77d
network: Fixup Table when L3MasterDevice is set on routing policy rule 2024-07-28 14:02:07 -04:00
Nick Cao
034b7dfc08
man: network: move note about L3MasterDevice to the correct section 2024-07-28 13:51:36 -04:00
Vladimir Panteleev
3f24fa57df man: clarify systemd-path variable source 2024-07-28 10:33:49 +01:00
Vladimir Panteleev
6c1e0823b0 man: improve ManagerEnvironment documentation
- Improve wording for explanation when these variables are inherited

- Clarify that these variables are not placed in the process environment block,
  so /proc/PID/environ cannot be used as a debugging tool
2024-07-28 10:33:17 +01:00
Luca Boccassi
0462e902bf
Merge pull request #33848 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-07-27 11:27:29 +01:00
Weblate Translation Memory
7f8b46724f po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Weblate Translation Memory <noreply-mt-weblate-translation-memory@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Martin Srebotnjak
3607e0cf52 po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-07-26 16:38:49 +02:00
Jose Ignacio Tornos Martinez
eef4cd51f9 kernel-install: remove depmod generated file modules.weakdep
The new file, modules.weakdep, generated by depmod to get the weak
dpendencies information can be present
(05828b4a6e),
so remove it like the other similar files.

Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-07-26 14:02:14 +01:00
Luca Boccassi
85c7a9a2f5
Merge pull request #27855 from Werkov/test-delegate-useraddfixup
Delegate/cgroup test refactor
2024-07-26 14:01:38 +01:00
Zbigniew Jędrzejewski-Szmek
e520b1258c
Merge pull request #30307 from bluca/enforce_inhibitors
logind: always check for inhibitor locks
2024-07-26 13:52:34 +02:00
Ronan Pigott
cd2ce31adb resolved: Don't retry queries that indicate net error
This probably rarely helped anyway, but it also in some cases interferes
with auxiliary dnssec queries where the authoritative nameserver does
not support EDNS0/DNSSEC.

Fixes: ac6844460ca1 ("resolved: support RFC 8914 EDE error codes")
2024-07-26 10:04:36 +01:00
Luca Boccassi
281b0bfbed
Merge pull request #33842 from DaanDeMeyer/test
Two fixes
2024-07-26 10:04:20 +01:00
Michal Koutný
3e6e3e6d40 test: Fail cgroup delegation test when user cannot be created
It means: a) user cannot be created, something's wrong in the
test environment -> fail the test; b) user already exists, we shall not
continue and delete (foreign) user.
2024-07-26 10:44:10 +02:00
Daan De Meyer
ae07feb401 resize-fs: Put minimal ext4 size in the same ballpark as the other filesystems
TEST-46-HOMED fails on ext4 because the filesystem is deemed to small
for activation by cryptsetup. Let's bump the minimal filesystem size for
ext4 a bit to be in the same ballpark as ext4 and btrfs to avoid weird
errors due to impossibly small filesystems.

Also use U64_MB while we're touching this.
2024-07-26 08:27:24 +02:00
Michal Koutný
4f0541dc59 test: Reorganize testcase of cgroup delegation
There are multiple subtests, just move them around into functions
(leveraging the testcase_* convention) to make space for new related
subtests.
2024-07-25 17:29:42 +02:00
Luca Boccassi
7020fa8feb
Merge pull request #33825 from DaanDeMeyer/chattr
repart: Create disk image file with copy-on-write disabled on btrfs
2024-07-25 14:11:11 +01:00
Luca Boccassi
9ce9dece4f shell completion: add support for sd-analyze capability --mask
Follow-up for 3e7a029c2856e7814b930443cc2d4fb089377592
2024-07-25 13:22:27 +01:00
Luca Boccassi
a6bcab05df
Merge pull request #33840 from bluca/test_locale_dbus
test: fix D-Bus policy override for TEST-73-LOCALE
2024-07-25 13:18:53 +01:00