summaryrefslogtreecommitdiffstats
path: root/src/timesync/timesyncd-manager.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-06-12Reapply "network: add "mac" to alternatives name policy by default"Yu Watanabe1-1/+1
This reverts commit 152c8946b3a93bb2c086568832d614cb54f11e13. The kernel patch https://lore.kernel.org/linux-usb/20240605153340.25694-1-gmazyland@gmail.com/ is now in net-next branch, and will be hopefully merged soon. Note that Debian's 73-usb-net-by-mac.link now also supports the kernel patch: https://salsa.debian.org/systemd-team/systemd/-/commit/c1afbb2dc295929085be86072c7942c8517ec598 So, hopefully, the change is ready. Let's reapply it.
2024-06-12creds-util: fix "weak" vs. "secure" display for tmpfs/noswap backed credentialsLennart Poettering2-5/+42
When we display passed credentials we show a brief safety level based on how the credential is pass in: if it's backed by swappable memory we give it a "weak" level. This check was so far done by checking if the file is backed by ramfs. However, since 1155f44f48f8fd59c863d71b3938e34a0b2fec2a we actually prefer tmpfs with the new "noswap" option for this. Hence, fix this, and explicitly look for "noswap" among the mount options in case we detect tmpfs.
2024-06-12shell-completion: only offer devices for completionDavid Tardon1-4/+1
This skips directories and other stuff like /dev/core, /dev/initctl or /dev/log.
2024-06-12NEWS: note that new stable releases will be in the main repoLuca Boccassi1-0/+5
2024-06-12docs: update RELEASE.md to use same repository for stable branchesLuca Boccassi1-3/+2
2024-06-12repart: Use CRYPT_ACTIVATE_PRIVATEDaan De Meyer1-1/+1
Let's skip udev device scanning when activating a LUKS volume in systemd-repart as we don't depend on any udev symlinks and don't expect anything except repart to access the volume. Suggested by https://github.com/systemd/systemd/issues/33129#issuecomment-2143390941.
2024-06-12test: dump a simple summary at the end of TEST-02-UNITTESTFrantisek Sumsal3-76/+14
Let's dump a list of skipped tests and logs from failed tests at the end of TEST-02-UNITTEST to make debugging fails in CI slightly less painful.
2024-06-12test-ip-protocol-list: include missing_network.h instead of netinet/in.hAntonio Alvarez Feijoo1-3/+2
This fixes the build for glibc < 2.32 Follow-up for 3f69070598b569bf20f5c296ff21f861bfe003e3
2024-06-12bus-util: add log message when exiting because of idleLennart Poettering1-0/+2
2024-06-12bus-util: add env var for disabling exit-on-idleLennart Poettering2-1/+21
2024-06-12update TODOLennart Poettering1-2/+0
2024-06-12analyze: add verb for dumping SMBIOS Type #11 dataLennart Poettering6-0/+109
I find myself wanting to check this data with a quick command, and browsing through /sys/ manually getting binary data sucks. Hence let's do add a nice little analysis tool.
2024-06-12core: split out smbios type 11 reader into src/shared/smbios11.[ch]Lennart Poettering4-25/+73
2024-06-12repart: Use crypt_reencrypt_run() if availableDaan De Meyer4-15/+17
crypt_reencrypt() is deprecated, so let's look for and prefer crypt_reencrypt_run() if it is available.
2024-06-12resolved: permit dnssec rrtype questions when we aren't validatingRonan Pigott1-3/+0
This check introduced in 91adc4db33f6 is intended to spare us from encountering broken resolver behavior we don't want to deal with. However if we aren't validating we more than likely don't know the state of the upstream resolver's support for dnssec. Let's let clients try these queries if they want. This brings the behavior of sd-resolved in-line with previouly stated change in the meaning of DNSSEC=no, which now means "don't validate" rather than "don't validate, because the upstream resolver is declared to be dnssec-unaware". Fixes: 9c47b334445a ("resolved: enable DNS proxy mode if client wants DNSSEC")
2024-06-12cryptsetup-generator: always process cmdline devicesDavid Tardon1-7/+2
2024-06-12cryptsetup-generator: parse all cmdline devices tooDavid Tardon1-4/+3
2024-06-12cryptsetup-generator: continue parsing after errorDavid Tardon1-5/+3
Let's make the crypttab parser more robust and continue even if parsing of a line failed.
2024-06-12cryptsetup-generator: refactor add_crypttab_devices()David Tardon1-38/+48
Move the processing of a crypttab entry to a separate function. No functional changes, just refactoring.
2024-06-12vsock-mux ssh proxyДамјан Георгиевски2-3/+65
allow the ssh-proxy to connect to cloud-hypervisor/Firecracker guests, via their unix-domain socket to AF_VSOCK multiplexer: https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/vsock.md https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md
2024-06-12core: invoke_main_loop() does not return MANAGER_RELOADYu Watanabe1-2/+1
Follow-up for 5409c6fcc55e6700360546c42edd4a021ee5014e.
2024-06-12tpm2-setup: Don't fail if we can't access the TPM due to authorization failureDaan De Meyer6-1/+36
The TPM might be password/pin protected for various reasons even if there is no SRK yet. Let's handle those cases gracefully instead of failing the unit as it is enabled by default.
2024-06-12strbuf: make length for strbuf_add_string() optionalYu Watanabe5-20/+22
2024-06-12strbuf: several cleanups for strbuf_add_string()Yu Watanabe1-9/+6
- add missing assertions, - use GREEDY_REALLOC() at one more place, - etc. Before: ``` $ sudo time valgrind --leak-check=full ./systemd-hwdb update ==112572== Memcheck, a memory error detector ==112572== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==112572== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==112572== Command: ./systemd-hwdb update ==112572== ==112572== ==112572== HEAP SUMMARY: ==112572== in use at exit: 0 bytes in 0 blocks ==112572== total heap usage: 1,320,113 allocs, 1,320,113 frees, 70,614,501 bytes allocated ==112572== ==112572== All heap blocks were freed -- no leaks are possible ==112572== ==112572== For lists of detected and suppressed errors, rerun with: -s ==112572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) 21.94user 0.19system 0:22.23elapsed 99%CPU (0avgtext+0avgdata 229876maxresident)k 0inputs+25264outputs (0major+57275minor)pagefaults 0swaps ``` After: ``` $ sudo time valgrind --leak-check=full ./systemd-hwdb update [sudo] password for watanabe: ==114732== Memcheck, a memory error detector ==114732== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==114732== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==114732== Command: ./systemd-hwdb update ==114732== ==114732== ==114732== HEAP SUMMARY: ==114732== in use at exit: 0 bytes in 0 blocks ==114732== total heap usage: 1,276,406 allocs, 1,276,406 frees, 68,500,491 bytes allocated ==114732== ==114732== All heap blocks were freed -- no leaks are possible ==114732== ==114732== For lists of detected and suppressed errors, rerun with: -s ==114732== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) 21.91user 0.24system 0:22.26elapsed 99%CPU (0avgtext+0avgdata 233584maxresident)k 0inputs+25168outputs (0major+58237minor)pagefaults 0swaps ```
2024-06-12strbuf: use GREEDY_REALLOC to grow the bufferq661-4/+1
This allows us to reserve a bunch of capacity ahead of time, improving the performance of hwdb significantly thanks to not having to reallocate so many times. Before: ``` $ sudo time valgrind --leak-check=full ./systemd-hwdb update ==113297== Memcheck, a memory error detector ==113297== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==113297== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==113297== Command: ./systemd-hwdb update ==113297== ==113297== ==113297== HEAP SUMMARY: ==113297== in use at exit: 0 bytes in 0 blocks ==113297== total heap usage: 1,412,640 allocs, 1,412,640 frees, 117,920,009,195 bytes allocated ==113297== ==113297== All heap blocks were freed -- no leaks are possible ==113297== ==113297== For lists of detected and suppressed errors, rerun with: -s ==113297== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) 132.44user 21.15system 2:35.61elapsed 98%CPU (0avgtext+0avgdata 228560maxresident)k 0inputs+25296outputs (0major+6886930minor)pagefaults 0swaps ``` After: ``` $ sudo time valgrind --leak-check=full ./systemd-hwdb update ==112572== Memcheck, a memory error detector ==112572== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==112572== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==112572== Command: ./systemd-hwdb update ==112572== ==112572== ==112572== HEAP SUMMARY: ==112572== in use at exit: 0 bytes in 0 blocks ==112572== total heap usage: 1,320,113 allocs, 1,320,113 frees, 70,614,501 bytes allocated ==112572== ==112572== All heap blocks were freed -- no leaks are possible ==112572== ==112572== For lists of detected and suppressed errors, rerun with: -s ==112572== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) 21.94user 0.19system 0:22.23elapsed 99%CPU (0avgtext+0avgdata 229876maxresident)k 0inputs+25264outputs (0major+57275minor)pagefaults 0swaps ``` Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2024-06-12core/exec-credential: drop unused unit_add_default_credential_dependenciesMike Yuan3-32/+1
2024-06-12Revert "core/credential,mount: re-read /proc/self/mountinfo before invoking ↵Mike Yuan5-45/+6
umount command" This reverts commit 1e1225614ca1106116dcad9fb37aaeb6106408ab. This was an incomplete workaround of the race. Now that we stop generating mount units for credential mounts, the logic could be dropped.
2024-06-12core/mount: stop generating mount units for cred mountsMike Yuan1-16/+17
While @poettering wants to keep mount units for credential mounts, this has brought nothing but pain in real life. By generating mount units for each cred mount, we had trouble with default dependencies on them, which causes their stop jobs to race with unmounting through exec_context_destroy_credentials(). There were several attempts to workaround the problem, but none seems very graceful: #26959, #28787, #28957, #31360, #32011. Also, we want to carry over credentials for services that survive soft-reboot to the new mount tree, and during the practice the stop of mount units are irritating. The mentioned problems are ultimately resolved by disabling default deps: #32799. But after doing that, maybe the next question should be "why do we generate these mount units at all?" Let's revisit the whole concept here. First of all, the credential dirs are supposed to be opaque to users, and hence nobody should really reference to these mounts directly. Secondly, the lifetime of credentials is strictly bound to the service units, but nothing else. Moreover, as more and more users of credentials pop up, we could end up with hundreds of such mount units, which is something we handle poorly. And we emit useless UnitRemoved signals, etc... As discussed, it seems that eliminating these mount units is the correct way to go. No real use cases are impacted, and the lifetime management becomes sane again. Replaces #32011
2024-06-12udev: tag MTD devices for systemdIan Abbott1-0/+2
Allow systemd units to require/bind to MTD devices. One use case is for using a systemd service to attach an MTD device to an UBI controller, which cannot be done until the MTD device has been probed. Fixes #33096
2024-06-12core/socket: allow MPTCP protocolMatthieu Baerts (NGI0)7-6/+21
Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension that enables a TCP connection to use different paths. It allows a device to make use of multiple interfaces at once to send and receive TCP packets over a single MPTCP connection. MPTCP can aggregate the bandwidth of multiple interfaces or prefer the one with the lowest latency, it also allows a fail-over if one path is down, and the traffic is seamlessly re-injected on other paths. To benefit from MPTCP, both the client and the server have to support it. Multipath TCP is a backward-compatible TCP extension that is enabled by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...). Multipath TCP is included in the Linux kernel since version 5.6 [2]. To use it on Linux, an application must explicitly enable it when creating the socket: int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP); No need to change anything else in the application. This patch allows MPTCP protocol in the Socket unit configuration. So now, a <unit>.socket can contain this to use MPTCP instead of TCP: [Socket] SocketProtocol=mptcp MPTCP support has been allowed similarly to what has been already done to allow SCTP: just one line in core/socket.c, a very simple addition thanks to the flexible architecture already in place. On top of that, IPPROTO_MPTCP has also been added in the list of allowed protocols in two other places, and in the doc. It has also been added to the missing_network.h file, for systems with an old libc -- note that it was also required to include <netinet/in.h> in this file to avoid redefinition errors. Link: https://www.rfc-editor.org/rfc/rfc8684.html [1] Link: https://www.mptcp.dev [2]
2024-06-12core: populate $REMOTE_ADDR for AF_UNIX socketsKamil Szczęk3-17/+36
Set the $REMOTE_ADDR environment variable for AF_UNIX socket connections when using per-connection socket activation (Accept=yes). $REMOTE_ADDR will now contain the remote socket's file system path (starting with a slash "/") or its address in the abstract namespace (starting with an at symbol "@"). This information is essential for identifying the remote peer in AF_UNIX socket connections, but it's not easy to obtain in a shell script for example without pulling in a ton of additional tools. By setting $REMOTE_ADDR, we make this information readily available to the activated service.
2024-06-12core/manager: enclose debug info acquirement in 'if (DEBUG_LOGGING)'Mike Yuan1-7/+7
2024-06-12rules: Limit the number of device units generated for serial ttysDaan De Meyer1-0/+2
As per the suggestion in https://github.com/systemd/systemd/issues/33242. This reduces the number of /dev/ttySXX device units generated in mkosi from 32 to 4.
2024-06-12udev: rewrite token_match_attr() to make it easier for Coverity to understandYu Watanabe1-15/+16
No functional change. Closes CID#1469719.
2024-06-12sd-dhcp-server: clear buffer before receiveYu Watanabe1-1/+1
I do not think this is necessary, but all other places in libsystemd-network we clear buffer before receive. Without this, Coverity warns about use-of-uninitialized-values. Let's silence Coverity. Closes CID#1469721.
2024-06-12bus-util: check sd_bus_pending_method_calls() when determining whether a ↵Lennart Poettering1-1/+3
service is idle
2024-06-12sd-bus: add new sd_bus_pending_method_calls() callLennart Poettering5-0/+114
2024-06-12tree-wide: never consider service idle if polkit authentication is still pendingLennart Poettering5-7/+36
Let's be correct on this.
2024-06-12hostnamed: don't allow hostnamed to exit on idle if varlink connections are ↵Lennart Poettering1-2/+9
still ongoing And while we are at it, ongoing PK authorizations are also a reason to block exit on idle.
2024-06-12unit-file,portable: replace streq + basename with path_equal_filenameMike Yuan2-2/+2
2024-06-12shared/install: use FOREACH_ARRAY at one more placeMike Yuan1-4/+14
2024-06-12shared/install: replace streq + basename with path_equal_filenameMike Yuan1-2/+2
2024-06-12shared/install: use path_extract_filename in install_info_traverseMike Yuan1-11/+12
2024-06-12shared/install: modernize unit_file_get_list, use key destructorMike Yuan7-68/+54
The rest of the basename()s are easy to drop.
2024-06-12shared/install: modernize unit_file_linkMike Yuan1-21/+26
Also eliminate one more use of basename(), yay!
2024-06-12install,dbus-manager: make unit_file_* take (char* const*) for strvMike Yuan3-25/+25
2024-06-12shared/install: modernize install_info_addMike Yuan1-22/+25
2024-06-12shared/install: modernize find_symlinks and friendsMike Yuan1-35/+26
2024-06-12shared/install: modernize remove_marked_symlink_fdMike Yuan1-47/+43
Note that we now collect errors from install_changes_add(), too.
2024-06-12shared/install: return bool where appropriateMike Yuan1-9/+12