Commit graph

71586 commits

Author SHA1 Message Date
Luca Boccassi ba6ec879bb
Merge pull request #31621 from poettering/resolved-proxy-do
resolved: proxy upstream local requests to our stub with DO bit set
2024-03-06 13:55:14 +00:00
Lennart Poettering d49dc7bbe7 string-util: allow taking SIZE_MAX as size to shorten to
This is useful for two reasons:

1. it addresses a potential overflow in a graceful way

2. Gives callers the ability to just pass SIZE_MAX for a NOP

Prompted by: #31341
2024-03-06 13:24:15 +00:00
Lennart Poettering 10d50d9eac udev: use strndupa_safe() rather than strndupa()
As per coding style, we don't use strndupa(), but strndupa_safe() only.

As a side-effect, this means musl folks can just drop this mess:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-core/systemd/systemd/0003-src-basic-missing.h-check-for-missing-strndupa.patch
2024-03-06 13:23:17 +00:00
Christian Wesselhoeft da95494ca3 PORTABLE_SERVICES.md: Improve grammar 2024-03-06 10:02:38 +00:00
Zbigniew Jędrzejewski-Szmek ec3cf73f30 meson/man: allow man pages to use multiple conditions
This way the man pages are installed only when the corresponding binary is
installed. The conditions in man pages and man/rules/meson.build are adjusted to
match the conditions for units in units/meson.build.
2024-03-06 09:55:01 +00:00
Luca Boccassi 4d34622d22 ukify: convert certificate to public key before embedding in .pcrpkey
Follow-up for 419b25ddca
2024-03-06 09:53:02 +00:00
Frantisek Sumsal 9990fe8257
Merge pull request #31642 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-03-06 10:40:41 +01:00
Frantisek Sumsal 4e5a7e1923 test: use 'ahost' instead of 'hosts' where applicable
As explained in [0] the 'hosts' database uses deprecated
gethostbyname2() which uses AF_INET6 instead of AF_UNSPEC for IPv6
lookups which is broken and makes the test fail with disabled IPv6.

[0] https://github.com/systemd/systemd/pull/28136#issuecomment-1974901039
2024-03-06 01:15:30 +00:00
Temuri Doghonadze 4c9837da42 po: Translated using Weblate (Georgian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main
2024-03-06 02:06:50 +01:00
Yuri Chornoivan 48e7ed190e po: Translated using Weblate (Ukrainian)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/uk/
Translation: systemd/main
2024-03-06 02:06:50 +01:00
Göran Uddeborg 32a56fd81c po: Translated using Weblate (Swedish)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-03-06 02:06:50 +01:00
Vasiliy Kovalev a850ae7a9c hwdb: Add touchpad toggle mapping for Kvadra LE14U/LE15U
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-03-05 22:08:09 +00:00
Mike Yuan 771bf2274a
basic: remove spuriously doubled newline and leftover separator
Follow-up for 3fc72d5413
2024-03-06 03:29:12 +08:00
Daan De Meyer 1ec5c1409e
Merge pull request #31550 from teknoraver/dlopen_compress
Dynamically load compression libraries
2024-03-05 20:16:19 +01:00
Daan De Meyer 674a9a010b
Merge pull request #31640 from DaanDeMeyer/mkosi
Mkosi fixes
2024-03-05 20:13:00 +01:00
Frantisek Sumsal 75c8b98090 test: bump the timeout for test-execute subtests if running w/ QEMU
Bump the timeout for test-execute subtests if running with plain QEMU
(as part of TEST-02-UNITTESTS), since we might start hitting the default
2m timeout with some more involved subtests, especially when the AWS
region we're running in is under heavy load. I see this regularly in the
CentOS Stream 9 nightly cron job with exec-dynamicuser-statedir.service
which has a lot of ExecStart's.
2024-03-05 18:50:14 +00:00
Daan De Meyer bb478caa86 mkosi: Use specifier to refer to the output directory
Otherwise the output directory cannot be configured by users.
2024-03-05 19:42:18 +01:00
Daan De Meyer c00b17f6d3 mkosi: Allow users to configure the build and cache directory 2024-03-05 19:41:50 +01:00
Daan De Meyer adbb0237c6 mkosi: Set minimum version
This will only be taken into account by newer mkosi versions but it'll
at least save some pain from running on a too old version.
2024-03-05 19:41:06 +01:00
Vishal Chillara Srinivas d08566fad7 resolved: remove entry from cache when goodbye packet received
RFC6762 10.1 says that queriers receiving a Multicast DNS response with a TTL
of zero SHOULD record a TTL of 1 and then delete the record one second later.

Added a timer event to trigger a callback to clean-up the cache one second after
a goodbye packet is received. The callback also checks for any cache entries
expiring within the next one second and schedules follow-up cleanup callbacks
accordingly.
2024-03-05 19:00:03 +01:00
Lennart Poettering 6399be223b resolved: make resolved authoritative in resolveing our local host name
This is a kinda a follow-up for ce266330fc: it
makes resolved authoritative on our local hostname, and never contacts
DNS anymore for it.

We effectively already were authoritative for it, except if the user
queried for other RR types than just A/AAAA. This closes the gap and
refuses routing other RR type queries to DNS.

Fixes: #23662
2024-03-05 15:31:32 +01:00
Lennart Poettering 4b91896226 resolved: make outselves authoritative for /etc/hosts entries in full
If you query for an MX RR of a host listed in /etc/hosts, let's return
an empty reply rather than NXDOMAIN, i.e. indicate that the name exists
but has no MX RR assigned, thus making ourselves authoritative.

The venerable "host" tool by default sends requests for A + AAAA + MX
and ensures we never propagate queries further on.

Fixes: #31223
2024-03-05 15:31:26 +01:00
Lennart Poettering 40008b83a0 resolved: rename variable found_{a|aaaa} → question_for_{a|aaaa}
Te variables indicate what kind of RRs we are looking for, but the name
so far suggests it was about what we already found. Let's rename the
variables to make the purpose clearer.
2024-03-05 15:31:02 +01:00
Lennart Poettering 8841d1cef8 resolved: do DNS RR type based routing
So far we only looked at the domain name when routing requests to
specific scopes. With this we'll also take the DNS RR type into account.
This takes benefit of the fact that lookups for RRs such as SOA or NS or
the various DNSSEC RR types never really make sense to be routed to
LLMNR or mDNS, since they don't have concepts there.

This hence refuses to route requests for those RR types to the
LLMNR/mDNS scopes, which hence means they'll likely be routed to classic
DNS instead.

This should improve behaviour of tools that assumes it speaks to classic
DNS only via 127.0.0.53, since it will now usually do that.
2024-03-05 15:29:25 +01:00
Lennart Poettering df81adba88 ci: disable test that is now answered by knot
dig question with DNSSEC on will now be proxied upstream, i.e. to the
test knot server. This leads to different results, but the result isn't
tha tinteresting since we don't want to test knot, but resolved. Hence
comment this test.

There seems to be something wrong with the test though, as the upstream
server refused recursion, but if so it is not suitable as an upstream
server really, as resolved can only be client to a recursive resolver.
2024-03-05 15:29:19 +01:00
Lennart Poettering 9c47b33444 resolved: enable DNS proxy mode if client wants DNSSEC
So far we disabled DNSSEC if local clients asked for it via DO flag if
DNSSEC=no is set. Let's instead switch to proxy mode in this case, and
thus treat client requested DO mode as a way to force proxy mode.

This means DNSSEC=no just controls whether resolved will do validation
for regular looups, but it has no effect anymore on lookups from clients
that indicated they want to do their own DNSSEC anyway.

Fixes: #19227 #23737 #25105
2024-03-05 15:29:15 +01:00
Lennart Poettering 718324c5e0 resolved: use relaxed single label rules when proxying DNS queries
When we use proxy mode when propagating DNS queries to upstream DNS
servers, let's use the relaxed single label rules. This has the benefit
that tools such "delv" work on the proxy stub 127.0.0.54.
2024-03-05 15:29:10 +01:00
Lennart Poettering 36418a4792 resolvectl: expose new SD_RESOLVED_RELAX_SINGLE_LABEL flag in resolvectl 2024-03-05 15:29:04 +01:00
Lennart Poettering d0eae64c1f resolved: add new SD_RESOLVED_RELAX_SINGLE_LABEL resolver flag
This new flag allows resolving single label names via public DNS. By
default this is turned off, and this option allows excepting a lookup
for this.
2024-03-05 15:28:54 +01:00
Luca Boccassi 11d1c90c49
Merge pull request #31631 from mrc0mmand/mkosi-addons
mkosi: fix UKI addons test
2024-03-05 14:16:49 +00:00
Antonio Alvarez Feijoo 43aca0d99e extract-word: update remaining calls to extract_many_words
Follow-up to 4f49512695
2024-03-05 12:21:42 +00:00
Yu Watanabe 21fdecdc13 sd-netlink: allow to call rtnl_get_link_info() without iftype and flags 2024-03-05 12:19:47 +00:00
Frantisek Sumsal e86b1a9b0f mkosi: make shellcheck happy 2024-03-05 12:41:30 +01:00
Matteo Croce 3c66db7e28 Update TODO file
Update the line about dynamically load compression libraries.
2024-03-05 12:38:39 +01:00
Matteo Croce 3fc72d5413 dynamically load compression libraries
Dynamically load liblz4, libzstd and liblzma with dlopen().
This helps to reduce the size of the initrd image when these libraries
are not really needed.
2024-03-05 12:37:21 +01:00
Matteo Croce 1c20c9f4fc move dlfcn-util into basic
I'm going to dlopen_many_sym_or_warn() in src/basic/compress.c, this
will introduce a circular dependency because libshared already depends
from libbasic.
To avoid this, move dlfcn-util.c from libshared to libbasic.
2024-03-05 12:33:44 +01:00
Frantisek Sumsal 193fa9d7fe Revert "mkosi: Don't fail on systemd-vconsole-setup.service failure for now"
This doesn't seem to fail anymore.

This reverts commit 84c7929cd4.
2024-03-05 12:18:40 +01:00
Frantisek Sumsal d9c8cf40b5 Revert "mkosi: Disable cmdline addon test for now"
Let's see if this finally works.

This reverts commit e167a8283d.
2024-03-05 12:16:44 +01:00
Frantisek Sumsal 374fa8e853 mkosi: fix UKI addons test
The test hasn't been working for a while, since there's no /efi or /boot
in $DESTDIR.

Resolves: #31618
2024-03-05 12:16:44 +01:00
Nick Rosbrook 70aece8193 test: check for kernel.apparmor_restrict_unprivileged_userns
Some tests in test-execute are already skipped if we do not have
unprivileged user namespaces. Extend this check to look for an apparmor
specific sysctl indicating that unprivileged userns creation is
restricted.
2024-03-05 11:15:49 +00:00
Max Gautier 7360be92ad Fixing bad link to Debian packages tests 2024-03-05 11:22:13 +01:00
Zbigniew Jędrzejewski-Szmek 27faf24a48
Merge pull request #31597 from keszybz/option-P-for-machinectl-and-timedatectl
Option -P for machinectl and timedatectl
2024-03-05 10:11:40 +04:00
Evgeny Vereshchagin 1500b656cd fuzz: dump LLDP neighbors JSON too
to make sure all the fields are in more or less good shape.

It's a follow-up to https://github.com/systemd/systemd/pull/31583
2024-03-05 12:40:28 +09:00
Luca Boccassi e0270bab43
Merge pull request #31582 from bluca/fix_hostnamed_ci
test: fix test-loopback and test-resolved-stream on Ubuntu 24.04
2024-03-04 20:37:52 +00:00
Mike Yuan 2560dcbfe6 stat-util: generalize is_* and verify_* handling 2024-03-04 19:53:51 +00:00
Lennart Poettering 2492c89af0 resolved,pcrlock: make a bunch of varlink introspection structures static
Not sure why gcc doesn't warn that these have no "extern" definition,
but also aren't static...
2024-03-04 19:50:54 +00:00
Lennart Poettering af8a03ccf8 resolved: mention the Varlink interface of resolved
This is ready from prime-time, hence mention it.
2024-03-04 19:50:01 +00:00
Lennart Poettering fbcfa943cd resolvectl: output nice error message if we can't JSONify RR
Some RR types we don't have a mapping to JSON for. Handle this
reasonably.
2024-03-04 19:49:21 +00:00
Lennart Poettering 217f63c9b8 varlink: allow strings for integer varlink IDL fields
This is a follow-up for 67a3028555: also
allow strings as integer during IDL validation of JSON records.
2024-03-04 19:47:26 +00:00
Frantisek Sumsal a7839bff68
Merge pull request #31619 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-03-04 20:29:34 +01:00