summaryrefslogtreecommitdiffstats
path: root/mkosi.sanitizers (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-07-31mkosi: Switch to autologin via credentialsDaan De Meyer1-2/+6
Let's use the newly added credentials to only enable autologin for /dev/console (systemd-nspawn) and /dev/hvc0 (qemu) instead of enabling autologin for every tty.
2024-07-31socket: fix socket activation of stopped services with pinned FD storeMichal Sekletar2-2/+12
2024-07-31units: Import tty specific credentials for each getty unitDaan De Meyer4-0/+8
As explained in the previous commit, this allows us to configure agetty and login for individual ttys instead of globally.
2024-07-31core: Add support for renaming credentials with ImportCredential=Daan De Meyer12-45/+339
This allows for "per-instance" credentials for units. The use case is best explained with an example. Currently all our getty units have the following stanzas in their unit file: """ ImportCredential=agetty.* ImportCredential=login.* """ This means that setting agetty.autologin=root as a system credential will make every instance of our all our getty units autologin as the root user. This prevents us from doing autologin on /dev/hvc0 while still requiring manual login on all other ttys. To solve the issue, we introduce support for renaming credentials with ImportCredential=. This will allow us to add the following to e.g. serial-getty@.service: """ ImportCredential=tty.serial.%I.agetty.*:agetty. ImportCredential=tty.serial.%I.login.*:login. """ which for serial-getty@hvc0.service will make the service manager read all credentials of the form "tty.serial.hvc0.agetty.xxx" and pass them to the service in the form "agetty.xxx" (same goes for login). We can apply the same to each of the getty units to allow setting agetty and login credentials for individual ttys instead of globally.
2024-07-31exec-credential: Skip duplicate credentials in load_credential_glob()Daan De Meyer2-5/+15
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-31exec-credential: Log if we skip duplicate credentialDaan De Meyer1-1/+3
2024-07-31Drop EEXIST handling in load_credential_glob()Daan De Meyer1-2/+0
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-31log: Fix size calculation for number of iovecsDaan De Meyer1-3/+3
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-31execute: Drop log level to unit log level in exec_spawn()Daan De Meyer3-2/+15
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-31Revert "execute: Call capability_ambient_set_apply even if ambient set is 0"Łukasz Stelmach1-1/+1
With ambient capabilities being dropped at the start of process managers (both system and user) as well as systemd-executor it isn't necessary to drop them here. Moreover, at this point also the inheritable set can be preserved. This makes it possible to assign a user session manager inheritable capabilities which combined with file capabilites (ei sets) of service executables enable running user services with capabilities but only when started by the manager. This reverts commit 943800f4e7728feb2416dd57b8c296614497b94f.
2024-07-31core: drop ambient capabilities in systemd-executorŁukasz Stelmach4-5/+43
Since the commit 963b6b906e ("core: drop ambient capabilities in user manager") systemd running as the session manager has dropped ambient capabilities retaining other sets allowing user services to be started with elevated capabilities. This, worked fine until the introduction of sd-executor. For a non-root process to be started with elevated capabilities by a non-root parent it either needs file capabilities or ambient capabilities in the parent process. Thus, systemd needs to allow sd-executor to inherit its ambient capabilities and sd-executor should drop them as systemd did before. The ambient set is managed for both system and session managers, but with the default set for PID#1 being empty, this code does not affect operation of PID#1. Fixes: bb5232b6a3 ("core: add systemd-executor binary")
2024-07-31man: suggest to enable global IPv6Forwarding= setting to make IPv6 packets ↵Yu Watanabe1-1/+9
forwarded Closes #33414.
2024-07-31NEWS: mention that udevadm test and test-builtin are now non-destructiveYu Watanabe1-0/+7
Follow-up for 089bef66316e5bdc91b9984148e5a6455449c1da. Prompted by https://github.com/systemd/systemd/issues/33619#issuecomment-2257576579.
2024-07-31network: mention that IPv4 ACD is enabled by default for 169.254.0.0/16Yu Watanabe1-3/+11
Prompted by #33824.
2024-07-31network: request non-NULL SSID when a wlan interface is configured as stationYu Watanabe1-0/+1
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-31efi: fix link to legacy EFI handover protocolLuca Boccassi1-1/+1
2024-07-31stub: allocate and zero enough space in legacy x86 handover protocolLuca Boccassi6-10/+29
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-30network: shorten code a bitYu Watanabe1-3/+0
2024-07-30network: call link_handle_bound_by_list() before trying to reconfigure interfaceYu Watanabe1-4/+7
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-30Revert "network/ndisc: ignore most fields of RA header when lifetime is zero"Ivan Shapovalov1-6/+0
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-30Fix detection of TDX confidential VM on Azure platformDaniel P. Berrangé3-6/+15
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-30test-network: add test case for preferred source with peerYu Watanabe2-0/+13
For issue #31950.
2024-07-30network: make link_get_address() provide matching address with peerYu Watanabe6-37/+63
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-30network/ipv4acd: manage ACD engines with Address objectYu Watanabe3-31/+44
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-30network: do not bring down bound interfaces immediatelyYu Watanabe1-19/+11
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-30document how TimeoutStartSec= affects notify-reload (#33653)Arian van Putten1-0/+6
* document how TimeoutStartSec= affects notify-reload
2024-07-30nspawn: remove macvlan interfaces before network namespace diedYu Watanabe3-0/+55
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-29kernel-install: Try some more initrd variants in 90-loaderentry.installDaan De Meyer1-2/+12
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-29kernel-install: Only read cmdline from /proc/cmdline when not in containerDaan De Meyer1-2/+4
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-29docs: Simplify hacking instructions a bitDaan De Meyer1-15/+4
We enable RuntimeBuildSources=yes by default so let's drop it from the documentation.
2024-07-29test: Don't mount build sources into image when running non-interactivelyDaan De Meyer2-2/+1
2024-07-29po: Translated using Weblate (Slovenian)Martin Srebotnjak1-5/+4
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-28network: Fixup Table when L3MasterDevice is set on routing policy ruleNick Cao1-3/+4
2024-07-28man: network: move note about L3MasterDevice to the correct sectionNick Cao1-2/+3
2024-07-28man: clarify systemd-path variable sourceVladimir Panteleev1-0/+6
2024-07-28man: improve ManagerEnvironment documentationVladimir Panteleev1-3/+5
- 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-26po: Translated using Weblate (Slovenian)Weblate Translation Memory1-3/+4
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-26po: Translated using Weblate (Slovenian)Martin Srebotnjak1-382/+200
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-26kernel-install: remove depmod generated file modules.weakdepJose Ignacio Tornos Martinez1-0/+1
The new file, modules.weakdep, generated by depmod to get the weak dpendencies information can be present (https://github.com/kmod-project/kmod/commit/05828b4a6e9327a63ef94df544a042b5e9ce4fe7), so remove it like the other similar files. Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
2024-07-26resolved: Don't retry queries that indicate net errorRonan Pigott1-1/+1
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-26test: Fail cgroup delegation test when user cannot be createdMichal Koutný1-1/+1
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-26resize-fs: Put minimal ext4 size in the same ballpark as the other filesystemsDaan De Meyer3-8/+8
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-25test: Reorganize testcase of cgroup delegationMichal Koutný1-88/+95
There are multiple subtests, just move them around into functions (leveraging the testcase_* convention) to make space for new related subtests.
2024-07-25shell completion: add support for sd-analyze capability --maskLuca Boccassi1-1/+7
Follow-up for 3e7a029c2856e7814b930443cc2d4fb089377592
2024-07-25NEWS: mention logind inhibitors changeLuca Boccassi1-0/+11
2024-07-25logind: always check for inhibitor locksLuca Boccassi13-72/+90
Currently inhibitors are bypassed unless an explicit request is made to check for them, or even in that case when the requestor is root or the same uid as the holder of the lock. But in many cases this makes it impractical to rely on inhibitor locks. For example, in Debian there are several convoluted and archaic workarounds that divert systemctl/reboot to some hacky custom scripts to try and enforce blocking accidental reboots, when it's not expected that the requestor will remember to specify the command line option to enable checking for active inhibitor locks. Also in many cases one wants to ensure that locks taken by a user are respected by actions initiated by that same user. Change logind so that inhibitors checks are not skipped in these cases, and systemctl so that locks are checked in order to show a friendly error message rather than "permission denied". Add new block-weak and delay-weak modes that keep the previous behaviour unchanged.
2024-07-25TEST-54-CREDS: Specify SMBIOS creds via corresponding mkosi optionDaan De Meyer1-6/+6
This allows mkosi to combine fstab.extra with its own fstab.extra so that it doesn't override the one we pass for the test.
2024-07-25sd-event: do not assert on invalid signalDavid Tardon1-1/+2
The signalfd_siginfo struct is received from outside via a FD, hence assert() is not appropriate way to check it. Just do a normal runtime check.
2024-07-25logind-dbus: check auth. for all inhibitor operationsDavid Tardon1-17/+22
Fixes #33834
2024-07-25docs/CONTROL_GROUP_INTERFACE.md: document accounting information available ↵Jeffrey Bosboom1-1/+1
via D-Bus