Commit graph

71768 commits

Author SHA1 Message Date
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
Mike Yuan f52e9ed62b
core/service: don't transition to start-post on cgroup empty event
with ExitType=cgroup

It's not clear to me what the rationale of the logic was
when ExitType=cgroup got introduced. But similar to
the previous commit, I think we should not transition to
'start-post' on cgroup empty event. This is especially
important for Type=dbus/notify services.
2024-03-05 10:45:52 +08:00
Mike Yuan 1651ce09c0
core/service: Type=notify/dbus services shouldn't be considered active
when ExitType=cgroup and main process exits

Follow-up for ef4300654e
2024-03-05 10:45:49 +08: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
Mike Yuan 3d1759299f
man/systemd-debug-generator: be consistent on '=' for boolean options 2024-03-05 02:19:58 +08:00
Oğuz Ersen ebc226d69b po: Translated using Weblate (Turkish)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
2024-03-04 19:12:57 +01:00
Piotr Drąg 374248ebe7 po: Translated using Weblate (Polish)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pl/
Translation: systemd/main
2024-03-04 19:12:57 +01:00
김인수 2471670994 po: Translated using Weblate (Korean)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main
2024-03-04 19:12:57 +01:00
Lennart Poettering 023bf8999f update TODO 2024-03-04 17:30:15 +01:00
Luca Boccassi 1e61de81f2 test: fix test-resolved-stream unit test failure
On Noble setting this ioctl fails:

1570s  819/1330 systemd:resolve / test-resolved-stream  FAIL 0.14s   killed by signal 6 SIGABRT
1570s Successfully forked off '(usernstest)' as PID 27737.
1570s Skipping PR_SET_MM, as we don't have privileges.
1570s (usernstest) succeeded.
1570s Assertion 'ioctl(socket_fd, SIOCSIFFLAGS, &req) >= 0' failed at src/resolve/test-resolved-stream.c:372, function try_isolate_network(). Aborting.

Ignore the result.
2024-03-04 16:28:10 +00:00
Luca Boccassi ba3c8e685a test: fix test-loopback failure when lacking privileges
Setting up the loopback might fail due to lack of privileges, as it
happens when running unit tests in the Noble CI environment. Skip
the test when it happens.

1584s  862/1330 systemd:test / test-loopback   FAIL  0.01s   exit status 1
1584s /* test_loopback_setup */
1584s Failed to configure loopback network device, ignoring: Operation not permitted
1584s loopback: Operation not permitted
2024-03-04 16:28:10 +00:00
Mike Yuan 82cf92e1f6
Merge pull request #31600 from YHNdnzj/fd-poll
core/service: several trivial cleanups for fdstore
2024-03-04 22:28:00 +08:00
Luca Boccassi b12ec739a9
Merge pull request #31615 from poettering/hostname-method-missing
hostnamectl: deal gracefully when talking to old hostnamed
2024-03-04 14:09:40 +00:00
Zbigniew Jędrzejewski-Szmek c5c619502b machinectl: add -P 2024-03-04 16:12:23 +04:00
Zbigniew Jędrzejewski-Szmek 31e70e88cd timedatectl: add -P 2024-03-04 16:12:21 +04:00
Lennart Poettering d8b4a2463f hostnamectl: gracefully handle old hostnamed replies to GetHardwareSerial()
Old versions of hostnamed used to propagate ENODEV/ENOENT as-is. Bad
idea. This was fixed in 171ddae1a1, but
let's handle this gracefully in hostnamectl.
2024-03-04 13:05:39 +01:00
Lennart Poettering 67648678b0 hostnamectl: properly initialize the two timestamp fields before doing bus call
Otherwise if talking to an old hostnamed (which doesn't have these
fields) we'd assume the timestamp is valid even though it isn't and show
garbage.
2024-03-04 13:05:31 +01:00
Weblate ca904495de po: Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/
Translation: systemd/main
2024-03-04 11:38:46 +00:00
Luca Boccassi 462db4bc0a
Merge pull request #31607 from mrc0mmand/update-translation-strings
po: update translation strings
2024-03-04 11:35:53 +00:00
Frantisek Sumsal b99a26e136 docs: update translation-related instructions
Just making them consistent with the rest of the doc.
2024-03-04 10:12:20 +01:00
Frantisek Sumsal ffc3240e99 po: update translation strings
Resolves: #31603
2024-03-04 10:12:11 +01:00
Frantisek Sumsal 7a63c5e550 test: explicitly set TERM=linux for TEST-69-SHUTDOWN
sulogin from the latest util-linux started falling back to vt102 instead
of linux, which makes screen sad (because we install only the linux
terminfo into the test image) and expect trips over the unexpected
warning. Let's just explicitly set TERM=linux before invoking screen to
avoid this.

+ make -C TEST-69-SHUTDOWN setup run
...
INFO:test-shutdown:log in and start screen
root
root
Last login: Sun Mar  3 13:19:31 from 18.191.105.60
-bash-5.2# screen
screen
Cannot find terminfo entry for 'vt102'.
-bash-5.2# ERROR:test-shutdown:Timeout exceeded.
2024-03-03 21:12:43 +01:00
Guilhem Lettron 85b774de49
kernel-install: Add kernel version to title (#31581)
When using uki, kernel installations always have the same name in
systemd-boot menu.

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2024-03-03 12:36:57 +00:00