diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-04-16 15:06:58 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-17 14:36:58 +0200 |
commit | a71980e030378f492f4271c46dcad561fc35e69c (patch) | |
tree | f8b25386cacdf9415933d7db1f90eabe1dd10d59 | |
parent | 7a2b5237d11116ff481877706f75fcc756730071 (diff) | |
download | systemd-a71980e030378f492f4271c46dcad561fc35e69c.tar.gz |
resolved: tone down comment in /run/systemd/{stub-,}resolve.conf
There are legitimate reasons to access the file directly, as currently
discussed on fedora-devel. Hence tone things down from "must" to "should
typically not".
Also, let's use fputs() instead of fputs_unlocked() here,
fopen_temporary_label() turns off stdio locking anyway for the whole
FILE*, hence no need to do this manually each time.
(cherry picked from commit ce416f425c509bac429b8c9971f5f4edf726a54f)
-rw-r--r-- | src/resolve/resolved-resolv-conf.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c index 7b487d50c6..f5fc13563d 100644 --- a/src/resolve/resolved-resolv-conf.c +++ b/src/resolve/resolved-resolv-conf.c @@ -283,9 +283,9 @@ static int write_uplink_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSe "# This is a dynamic resolv.conf file for connecting local clients directly to\n" "# all known uplink DNS servers. This file lists all configured search domains.\n" "#\n" - "# Third party programs must not access this file directly, but only through the\n" - "# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,\n" - "# replace this symlink by a static file or a different symlink.\n" + "# Third party programs should typically not access this file directly, but only\n" + "# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a\n" + "# different way, replace this symlink by a static file or a different symlink.\n" "#\n" "# See man:systemd-resolved.service(8) for details about the supported modes of\n" "# operation for /etc/resolv.conf.\n" @@ -308,24 +308,24 @@ static int write_uplink_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSe } static int write_stub_resolv_conf_contents(FILE *f, OrderedSet *dns, OrderedSet *domains) { - fputs_unlocked("# This file is managed by man:systemd-resolved(8). Do not edit.\n" - "#\n" - "# This is a dynamic resolv.conf file for connecting local clients to the\n" - "# internal DNS stub resolver of systemd-resolved. This file lists all\n" - "# configured search domains.\n" - "#\n" - "# Run \"resolvectl status\" to see details about the uplink DNS servers\n" - "# currently in use.\n" - "#\n" - "# Third party programs must not access this file directly, but only through the\n" - "# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,\n" - "# replace this symlink by a static file or a different symlink.\n" - "#\n" - "# See man:systemd-resolved.service(8) for details about the supported modes of\n" - "# operation for /etc/resolv.conf.\n" - "\n" - "nameserver 127.0.0.53\n" - "options edns0\n", f); + fputs("# This file is managed by man:systemd-resolved(8). Do not edit.\n" + "#\n" + "# This is a dynamic resolv.conf file for connecting local clients to the\n" + "# internal DNS stub resolver of systemd-resolved. This file lists all\n" + "# configured search domains.\n" + "#\n" + "# Run \"resolvectl status\" to see details about the uplink DNS servers\n" + "# currently in use.\n" + "#\n" + "# Third party programs should typically not access this file directly, but only\n" + "# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a\n" + "# different way, replace this symlink by a static file or a different symlink.\n" + "#\n" + "# See man:systemd-resolved.service(8) for details about the supported modes of\n" + "# operation for /etc/resolv.conf.\n" + "\n" + "nameserver 127.0.0.53\n" + "options edns0\n", f); if (!ordered_set_isempty(domains)) write_resolv_conf_search(domains, f); |