summaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-11-23sd-event: reenable epoll_pwait2()Lennart Poettering4-113/+9
This reenables epoll_pwait2() use, i.e. undoes the effect of 39f756d3ae4765b8bf017567a12b8a4b358eaaf5. Instead of just reverting that, this PR will change things so that we strictly rely on glibc's new epoll_pwait2() wrapper (which was added earlier this year), and drop our own manual fallback syscall wrapper. That should nicely side-step any issues with correct syscall wrapping definitions (which on some arch seem not to be easy, given the sigset_t size final argument), by making this a glibc problem, not ours. Given that the only benefit this delivers are time-outs more granular than msec, it shouldn't really matter that we'll miss out on support for this on systems with older glibcs.
2022-11-22gpt: Drop PARTITION_LINUX_GENERIC and PARTITION_USER_HOMEDaan De Meyer3-7/+4
These don't have an inherent purpose, and aren't used throughout the codebase, so let's simplify things and remove these. See https://github.com/systemd/systemd/pull/24803#discussion_r1028190421 for more information.
2022-11-22gpt: Specify designator array sizes explicitlyDaan De Meyer1-2/+2
Avoid users accidentally accessing uninitialized memory by always making sure the array size covers all possible enum values.
2022-11-22man/journalctl: mention systemd-cat, make the description more directZbigniew Jędrzejewski-Szmek1-7/+16
We said "query the journal". This is true but also very generic. Let's say "print log entries from the journal" instead, so that users who are looking for "logging" are more likely to figure out that the journalctl is the tool for them. Also, mention systemd-journal-remote.service which can write the journal too. And give some hints how to figure out how to write *to* the journal.
2022-11-22man: update docs for MemoryZSwapMax=Anita Zhang1-3/+20
2022-11-22resolved: Fix OpenSSL error messagesBenjamin Fogle1-39/+26
2022-11-22network: wifi: try to reconfigure when connectedYu Watanabe3-1/+14
Sometimes, RTM_NEWLINK message with carrier is received earlier than NL80211_CMD_CONNECT. To make SSID= or other WiFi related settings in [Match] section work, let's try to reconfigure the interface. Fixes a bug introduced by 96f5f9ef9a1ba5146d3357c1548fb675d3bd5b68. Fixes #25384.
2022-11-22network: drop unnecessary prototypeYu Watanabe1-1/+0
Follow-up for a39a9ac8065c29330207838b70fe388bde2bc254.
2022-11-22systemctl: edit: write override files as text filesнаб1-0/+12
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-22bootctl: use grey-and-slash prefix for source in list tooZbigniew Jędrzejewski-Szmek1-3/+10
Follow-up for 7851732262ec94f50598c4a289589a6ddb97ebfd. The source field also shows a path relative to $BOOT, so it should be displayed in the same fashion.
2022-11-22udev: make sure auto-root logic also works in UKIs booted from XBOOTLDRLennart Poettering1-14/+13
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-22tree-wide: make constant ratelimit compound actually constLennart Poettering10-10/+10
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-22boot: remove random-seed-modeJason A. Donenfeld7-77/+5
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-21basic/strv: check printf arguments to strv_extendf()Zbigniew Jędrzejewski-Szmek1-1/+1
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-21manager: fix format strings for trigger metadataZbigniew Jędrzejewski-Szmek1-4/+4
Fixup for c8bc7519c888a99134f88f8c82353246d3c0cc5d.
2022-11-21mkosi: pull in libbpf1 instead of legacy libbpf0 on debianLennart Poettering1-1/+1
2022-11-21dlfcn-util: add static asserts ensuring our sym_xyz() func ptrs match the ↵Lennart Poettering7-12/+64
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-21update TODOLennart Poettering1-0/+6
2022-11-21bootctl: install system token on virtualized systemsJason A. Donenfeld3-37/+6
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-21docs/BOOT_LOADER_INTERFACE: reword sentence to apply to both entry typesZbigniew Jędrzejewski-Szmek1-3/+3
2022-11-21tree-wide: BLS and DPS are now on uapi-group websiteZbigniew Jędrzejewski-Szmek28-85/+88
2022-11-21repart: Rework PartitionTarget initializationDaan De Meyer1-13/+9
2022-11-21repart: Use fd based operations in partition_populate_directory()Daan De Meyer1-4/+5
2022-11-21man/sd_bus_default: Refer to man-pages project (man7.org) for ssh(1)BerndAdameit1-2/+2
2022-11-21repart: Remove redundant parentheses in partition_populate_directory()Daan De Meyer1-1/+1
2022-11-21mkfs-util: Use FORK_CLOSE_ALL_FDSDaan De Meyer1-2/+2
2022-11-21mkfs-util: Prefer fd based stat() where possibleDaan De Meyer1-1/+1
2022-11-21mkfs-util: Use GID_FMTDaan De Meyer1-2/+2
2022-11-21repart: Use ASSERT_PTR() in partition_encrypt()Daan De Meyer1-2/+2
2022-11-21repart: Use ftruncate() instead of posix_allocate()Daan De Meyer1-1/+1
2022-11-21repart: Fix parse_filter_partitions() log messagesDaan De Meyer1-2/+2
2022-11-21repart: Fix FilterPartitionsType enum nameDaan De Meyer1-1/+1
2022-11-21repart: Rework unused partition number algorithmDaan De Meyer1-10/+7
2022-11-21repart: Use IN_SET() in one more placeDaan De Meyer1-3/+1
2022-11-20po: Translated using Weblate (Dutch)Richard E. van der Luit1-10/+10
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-19boot: Replace firmware security hooks directlyJan Janssen1-79/+40
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-19boot: Rework security arch overrideJan Janssen4-152/+146
This simplifies the caller interface for security arch overrides by only having to pass a validator and an optional context.
2022-11-19boot: Manually convert filepaths if neededJan Janssen1-4/+36
The conversion of a filepath device path to text is needed for the stub loader to find credential files.
2022-11-19boot: Do not require a loaded image pathJan Janssen1-10/+3
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-19boot: Fix memory leakJan Janssen1-1/+1
2022-11-19remove obsolete translate in zh_CN.polichao1-2/+0
2022-11-19dbus-manager: add comments about booleans in function callsMike Yuan1-14/+14
Update to match the new coding style See also: https://github.com/systemd/systemd/pull/25437#discussion_r1026934242
2022-11-18test-network: add tests for RTT and ACK filter for CAKEYu Watanabe2-0/+4
2022-11-18network: tc-cake: add support to specify ACK filterYu Watanabe4-0/+89
2022-11-18bootctl: rework how we handle referenced but absent EFI boot entriesLennart Poettering1-1/+5
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-18resolved: when configuring 127.0.0.1 as per-interface DNS server, contact it ↵Lennart Poettering1-0/+5
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-18resolved: use right conditionalization when setting unicast ifindex on UDP ↵Lennart Poettering1-1/+1
sockets
2022-11-18nspawn: allow sched_rr_get_interval_time64 through seccomp filterSam James1-0/+1
We only allow a selected subset of syscalls from nspawn containers and don't list any time64 variants (needed for 32-bit arches when built using TIME_BITS=64, which is relatively new). We allow sched_rr_get_interval which cpython's test suite makes use of, but we don't allow sched_rr_get_interval_time64. The test failures when run in an arm32 nspawn container on an arm64 host were as follows: ``` ====================================================================== ERROR: test_sched_rr_get_interval (test.test_posix.PosixTester.test_sched_rr_get_interval) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-3.11.0_p1/work/Python-3.11.0/Lib/test/test_posix.py", line 1180, in test_sched_rr_get_interval interval = posix.sched_rr_get_interval(0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 1] Operation not permitted ``` Then strace showed: ``` sched_rr_get_interval_time64(0, 0xffbbd4a0) = -1 EPERM (Operation not permitted) ``` This appears to be the only time64 syscall that isn't already included one of the sets listed in nspawn-seccomp.c that has a non-time64 variant. Checked over each of the time64 syscalls known to systemd and verified that none of the others had a non-time64-variant whitelisted in nspawn other than sched_rr_get_interval. Bug: https://bugs.gentoo.org/880131
2022-11-18sysupdate: Support volatile-root for finding the root partitionreuben olinsky1-4/+18
The existing logic can't find the root device in scenarios where the root has been replaced with an overlay. We support looking at "/run/systemd/volatile-root" to find the original root, similar to what systemd-repart and gpt-auto-generator do.
2022-11-18update TODOLennart Poettering1-0/+6