1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

49752 Commits

Author SHA1 Message Date
Lennart Poettering
048e043375 resolved: actually use the specified rrsig argument
The argument only exists to be used to override/fill in the RRSIG record
of the answer item. Hence actually use it instead of ignore it.

(Not sure how this got lost earlier.)

Fixes: #18714
2021-02-23 01:52:33 +01:00
Zbigniew Jędrzejewski-Szmek
67e700bad7
Merge pull request #18741 from poettering/stub-no-cname
resolved: don't follow CNAMEs in the stub anymore
2021-02-23 01:52:01 +01:00
Zbigniew Jędrzejewski-Szmek
8ebfd50aaf shared/condition: add ConditionControlGroupController=v1|v2
Before, we only allowed conditionalizing on controllers, not the hierarchy.
This commit extends this to allow a simple check for v1 (i.e. classic or hybrid),
and v2 (full unified).

An alternative approach would be to add a separate Condition for this, but I'm
not too keen on that, considering that v1 is already being deprecrecated
(c.f. 82f3063218).
2021-02-23 01:11:18 +01:00
Luca Boccassi
6c3f7ca036 MountImages: parse unit specifiers after permissive hyphen
The permissive bit it not something a specifier might synthetise
2021-02-23 01:11:05 +01:00
Zbigniew Jędrzejewski-Szmek
267294e08d
Merge pull request #18745 from keszybz/stop-using-fstrings
Stop using fstrings
2021-02-23 01:10:38 +01:00
Zbigniew Jędrzejewski-Szmek
d6191ed529 test-dns-packet: fix leak of DnsResourceRecord object 2021-02-23 01:06:08 +01:00
Zbigniew Jędrzejewski-Szmek
897a25617d NEWS: a few more entries for v248-rc1
I left the stuff related to [NextHop] out. There are still
patches outstanding, and we can add a comprehensive entry once
things reached the final form.
2021-02-23 00:47:55 +01:00
Zbigniew Jędrzejewski-Szmek
a5e5e102ba
Merge pull request #18704 from keszybz/fallback-hostame-override
Allow overriding of fallback hostname through envvar and os-release field
2021-02-23 00:41:27 +01:00
Lennart Poettering
5bd7ebb332 resolved: stick CNAME targets into main answer section in stub replies 2021-02-22 23:55:13 +01:00
Lennart Poettering
d1f8fbea9f resolved: add dns_resource_record_get_cname_target() helper
This determines the redirection target from a CNAME or DNAME RR given it
matches some given RR key.
2021-02-22 23:55:13 +01:00
Lennart Poettering
990e7e87ad resolved: remove duplicate comment
Practically the same comment is a few lines up covering both parts
anyway, let's remove one.
2021-02-22 23:55:13 +01:00
Lennart Poettering
c6ebf89b8f resolved: update comment in DNS stub code a bit
There's no "answer_auxiliary" object anymore, it's all one "answer"
object, and we have per-item flags that tell us which section things are
from, i.e. from the main answer section, or the additional or
authoritative ones.
2021-02-22 23:55:13 +01:00
Lennart Poettering
2f4d8e577c resolved: don't follow CNAMEs in the stub anymore
CNAME following was broken by 775ae35403
where we'd not properly collect RRs along the CNAME path. Good thing
though is that we don't have to anymore: since we nowadays propagate all
sections of the upstream replies into the cache and back to stub clients
all the information should already be available anyway, and there's no
need for us to collect it.

Fixes: #18690
2021-02-22 23:55:13 +01:00
Zbigniew Jędrzejewski-Szmek
dda7d0a4d6
Merge pull request #18575 from bugaevc/aa
Set the AA bit in answers for synthetic records & mDNS
2021-02-22 23:08:13 +01:00
Zbigniew Jędrzejewski-Szmek
f2ec239c2b Revert "generate-dns_type-gperf: modernize python syntax"
This reverts commit b0a336a669.

Fixes #18708.
2021-02-22 22:43:14 +01:00
Zbigniew Jędrzejewski-Szmek
1f9441a72b Stop using f-strings in generate-sym-test.py
This partially reverts 7857b6e838.
Debian 9 has python3.5 which does not have f-strings yet.

Partially fixes #18708.
2021-02-22 22:43:00 +01:00
Zbigniew Jędrzejewski-Szmek
85c8eac822 docs: align tables vertically to top
Fixes #18706.
2021-02-22 22:29:34 +01:00
Frantisek Sumsal
1a7c5ec4b2 Translated using Weblate (Slovak)
Currently translated at 24.8% (47 of 189 strings)

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sk/
Translation: systemd/main
2021-02-22 21:26:57 +01:00
Yu Watanabe
c83e44110c
Merge pull request #18718 from yuwata/network-nexthop-blackhole
network: introduce Blackhole= setting in [NextHop] section
2021-02-23 04:44:12 +09:00
Yu Watanabe
e82a0ef1cf
Merge pull request #18734 from poettering/cryptsetup-description-escape
cryptsetup: unescape ID_PART_ENTRY_NAME udev field
2021-02-23 04:43:22 +09:00
Luca Boccassi
79e20ceb59 MountImages: fix exec_context_dump printf
Use strempty as options might not be set, and add the separator
for each option tuple
2021-02-23 04:42:39 +09:00
Yu Watanabe
518339d89f
Merge pull request #18731 from yuwata/backlight-trivial-cleanups
backlight: trivial cleanups
2021-02-23 04:42:09 +09:00
Zbigniew Jędrzejewski-Szmek
8770c8135b hostnamed: rename FallbackHostname to DefaultHostname
This follows the addition of DEFAULT_HOSTNAME= in os-release.
The distinction between the value from os-release or the env var and
the compile-time setting is not made in the api: HostnameSource is
"default" is all cases. I think that this level of detail is not needed,
because the users of this mostly care whether the hostname was set by
user configuration or not.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
e7637751c4 Use the DEFAULT_HOSTNAME field from os-release
This provides a fairly comprehensible fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1893417.

This adds yet-another level of configuration:
- /etc/hostname
- transient hostname
- $SYSTEMD_DEFAULT_HOSTNAME
- DEFAULT_HOSTNAME is os-release
- -Dfallback-hostname=
- "linux"

It's a lot of layers, but each has it's own justification.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
05c6f341b1 Allow the fallback hostname to be overriden using an environment variable
See https://bugzilla.redhat.com/show_bug.cgi?id=1893417 for the back story:
the fallback hostname matters a lot in certain environments. Right now the only
way to configure the fallback hostname is by recompiling systemd, which is
obviously problematic in case when the fallback hostname shall differ between
different editions of the same distro that share a single compiled rpm.

By making this overridable through an envvar, we're providing an escape hatch
without making this a top-level api. Later on a way to set this through
os-release is added, but I think the approach with the variable is still
useful. It it very convenient for testing, or to override settings only in a
particular service, etc.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
209c14705d basic/os-util: make the sentinel implicit 2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
6ef06723b1 Move os-util.[ch] to basic/
parse_os_release() will be used basic/hostname-util.c later on.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
fd03a6a92b sysext: move extension_release_validate() out of os-util.c 2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
addddf565b os-release: add the DEFAULT_HOSTNAME= setting
The motivation is that variants of the same distro that share the same compiled
rpm want to customize various aspects of the system, in particular the
hostname. In some sense the default hostname is part of the identity of the
system, so setting it through os-release makes sense. In particular, instead of
setting a default value in /etc/hostname, the appropriate default can be baked
into the image, leaving /etc/hostname for local overrides only.

Why make this a separate field instead of e.g. using NAME from os-release?
NAME is already used for other purposes, and it seems likely that people want
to set those independently.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
aa96ef86a7 man: use ~/.config instead of XDG_CONFIG_HOME
e3820eeaf1 did that replacement XDG_CONFIG_HOME, in one
of two places. Let's use ~/.config everywhere.

Quoting https://github.com/systemd/systemd/pull/18704#discussion_r579465254:
> I'd really drop XDG_CONFIG_HOME from the docs. It's confusing enough as it
> is. Where we don't need the indirections we should not confuse people with
> it, in particular as people might then think it's actually a good idea to use
> that env var and redirect things. I'd just show the literal path everywhere,
> even if we internally use the env var.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
d55ed7de34 manager: add ManagerEnvironment configuration setting
This is useful for various variables that modify process behaviour. This makes
it easy to set it for pid1 without touching the kernel command line. Even for
the *user manager* this also can be convenient for the unprivileged user, who
cannot modify user@.service definition.

Variables that could be set like this include $SD_EVENT_PROFILE_DELAYS,
$SYSTEMD_FALLBACK_HOSTNAME, $SYSTEMD_MEMPOOL, $SYSTMED_RDRAND, etc.
2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
fa256f43e7 basic/env-util: add putenv_dup() 2021-02-22 20:10:55 +01:00
Zbigniew Jędrzejewski-Szmek
e6c31188dc
Merge pull request #18735 from poettering/some-doc-fixes
three documentation fixes
2021-02-22 19:45:01 +01:00
Yu Watanabe
69a91c704e test-network: add tests for Blackhole= setting in [NextHop] section 2021-02-23 02:21:35 +09:00
Yu Watanabe
484555f3f2 network: route: shorten code a bit 2021-02-23 02:21:31 +09:00
Yu Watanabe
30f1083709 network: nexthop: add Blackhole= setting in [NextHop] section
As similar to unreachable type routes, blackhole nexthops do not have
NHA_OID attribute, so they are managed by Manager.
2021-02-23 02:21:17 +09:00
Lennart Poettering
0a6aa7a238 man: try to improve documentation of conditions/asserts
Fixes: #18725
2021-02-22 18:12:34 +01:00
Lennart Poettering
f553b772e9 docs: , → . 2021-02-22 18:00:14 +01:00
Lennart Poettering
c6e33c293e man: correct documentaiton of StandardInput='s defaults in regards to "data"
Fixes: #18710
2021-02-22 17:52:20 +01:00
Lennart Poettering
fadd34dd5a cryptsetup: unescape ID_PART_ENTRY_NAME udev property before using it
Fixes: #18729
2021-02-22 17:39:50 +01:00
Lennart Poettering
930aa88f04 tree-wide: use sd_device_new_from_stat_rdev() whereever appropriate 2021-02-22 17:38:57 +01:00
Yu Watanabe
b77c929934 backlight: reindent comments 2021-02-22 23:45:55 +09:00
Yu Watanabe
d17d66f0ab backlight: reduce indentation a bit 2021-02-22 23:25:00 +09:00
Zbigniew Jędrzejewski-Szmek
5735ab0979 fuzz-systemctl-parse-argv: add "telinit" to the argv[0] list 2021-02-22 14:22:07 +00:00
Yu Watanabe
ba6c9b7994 backlight: same_device() may return negative errno 2021-02-22 23:11:28 +09:00
Yu Watanabe
7a9737bc7d backlight: exit earlier when unknown verb is specified 2021-02-22 23:00:46 +09:00
Yu Watanabe
84d32bf59b test-network: test wireguard peer in drop-in config
Closes #18241.
2021-02-22 21:33:36 +09:00
Sergey Bugaev
bb4e030fcb resolved: set the AA bit for mDNS responses
This is required by RFC 6762.

Fixes https://github.com/systemd/systemd/issues/17972
2021-02-22 14:52:13 +03:00
Sergey Bugaev
4ad017cda5 resolved: set the AA bit for synthetic answers
The stub DNS server is authoritative for the RRs we synthesize, such as
localhost, _gateway, and entries from /etc/hosts, and also for trust anchors.

Partially fixes https://github.com/systemd/systemd/issues/17972
2021-02-22 14:51:29 +03:00
Zbigniew Jędrzejewski-Szmek
b332778b30
Merge pull request #18684 from yuwata/sd-device-cleanups-and-udevadm-fix
sd-device, udev: several cleanups and one udevadm fix
2021-02-22 11:32:38 +01:00