4a6eb82445
This adds minimal support for RFC5001 NSID to the stub resolver. This useful to identify systemd-resolved when talking to the stub resolver, and distuingishing the packets resolved answers itself (where NSID is now set) from those which it proxies 1:1 upstream (where NSID will not be set, or set to whatever the upstream server has it set to). The NSID chosen consist of two parts: 1. The first part is derived from /etc/machine-id and identifies the resolved instance in a stable way. 2. The second part is the fixed string ".resolved.systemd.io". This thus maybe used for a veriety of checks: a. Am I talking to a resolved stub? b. Am I talking to the same stub as last time? c. Am I talking to the local resolved? Given that the first part leaks the identity of the system in away two protections are in place: I) The NSID is only included on the main stub, not the extra stub. The main stub has with a TTL of 1 and other protections a lot of safety in place that the datagrams never leave the local system, thus the identifying info is only accessible to the local system — but /etc/machine-id is accessible to local software anyway. II) The NSID is hashed from /etc/machine-id in a non-invertable way, so that the machine ID itself isn't leaked, but only an identifier derived from it. Example dig run: ``` $ dig +nsid localhost @127.0.0.53 ; <<>> DiG 9.11.23-RedHat-9.11.23-1.fc33 <<>> +nsid localhost @127.0.0.53 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46917 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ; NSID: 35 33 64 34 61 34 66 63 32 31 32 65 34 31 61 30 39 66 30 39 65 33 32 34 63 64 64 38 30 36 32 33 2e 72 65 73 6f 6c 76 65 64 2e 73 79 73 74 65 6d 64 2e 69 6f ("53d4a4fc212e41a09f09e324cdd80623.resolved.systemd.io") ;; QUESTION SECTION: ;localhost. IN A ;; ANSWER SECTION: localhost. 0 IN A 127.0.0.1 ;; Query time: 0 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Do Nov 12 20:57:16 CET 2020 ;; MSG SIZE rcvd: 110 ``` |
||
---|---|---|
.github | ||
.lgtm/cpp-queries | ||
.mkosi | ||
.semaphore | ||
catalog | ||
coccinelle | ||
docs | ||
factory/etc | ||
hwdb.d | ||
man | ||
mkosi.default.d | ||
modprobe.d | ||
network | ||
po | ||
presets | ||
rules.d | ||
shell-completion | ||
src | ||
sysctl.d | ||
sysusers.d | ||
test | ||
tmpfiles.d | ||
tools | ||
units | ||
xorg | ||
.clang-format | ||
.ctags | ||
.dir-locals.el | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.lgtm.yml | ||
.mailmap | ||
.packit.yml | ||
.vimrc | ||
.ycm_extra_conf.py | ||
configure | ||
LICENSE.GPL2 | ||
LICENSE.LGPL2.1 | ||
Makefile | ||
meson_options.txt | ||
meson.build | ||
mkosi.build | ||
NEWS | ||
README | ||
README.md | ||
TODO | ||
zanata.xml |
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.