From e6b2d948f8f5aabf6cdede8bd39256fe83db205e Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Tue, 24 Oct 2017 09:28:41 -0400 Subject: resolved: create private stub resolve file for /etc/resolv.conf integration (#7014) This creates a second private resolve.conf file which lists the stub resolver and the resolved acquired search domains. This runtime file should be used as a symlink target for /etc/resolv.conf such that non-nss based applications can resolve search domains. Fixes: #7009 --- man/systemd-resolved.service.xml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'man/systemd-resolved.service.xml') diff --git a/man/systemd-resolved.service.xml b/man/systemd-resolved.service.xml index d07d1968b4..c60f474aa8 100644 --- a/man/systemd-resolved.service.xml +++ b/man/systemd-resolved.service.xml @@ -94,7 +94,8 @@ systemd.network5 for details about systemd's own configuration files for DNS servers. To improve compatibility, /etc/resolv.conf is read in order to discover configured system DNS servers, but only if it is - not a symlink to /run/systemd/resolve/resolv.conf (see below). + not a symlink to /run/systemd/resolve/stub-resolv.conf or + /run/systemd/resolve/resolv.conf (see below). systemd-resolved synthesizes DNS resource records (RRs) for the following cases: @@ -164,15 +165,26 @@ <filename>/etc/resolv.conf</filename> - Three modes of handling /etc/resolv.conf (see + Four modes of handling /etc/resolv.conf (see resolv.conf5) are supported: + systemd-resolved maintains the + /run/systemd/resolve/stub-resolv.conf file for compatibility with traditional Linux + programs. This file may be symlinked from /etc/resolv.conf. This file lists the 127.0.0.53 + DNS stub (see above) as the only DNS server. It also contains a list of search domains that are in use by + systemd-resolved. The list of search domains is always kept up-to-date. Note that + /run/systemd/resolve/stub-resolv.conf should not be used directly by applications, but only + through a symlink from /etc/resolv.conf. This file may be symlinked from + /etc/resolv.conf in order to connect all local clients that bypass local DNS APIs to + systemd-resolved with correct search domains settings. This mode of operation is + recommended. + A static file /usr/lib/systemd/resolv.conf is provided that lists the 127.0.0.53 DNS stub (see above) as only DNS server. This file may be symlinked from /etc/resolv.conf in order to connect all local clients that bypass local DNS APIs to - systemd-resolved. This mode of operation is recommended. + systemd-resolved. This file does not contain any search domains. systemd-resolved maintains the /run/systemd/resolve/resolv.conf file for compatibility with traditional Linux -- cgit v1.2.1