diff options
author | Thomas Haller <thaller@redhat.com> | 2018-06-01 08:29:15 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-06-01 09:05:38 +0200 |
commit | bc28a2b1641c2edadbddd30070f10c920301c190 (patch) | |
tree | 20e5b445a23b213bdb05635747f2a60a0ec807ea /src/dns | |
parent | 5485dbea21786a26e4722dfabb555c153d13a05c (diff) | |
download | NetworkManager-bc28a2b1641c2edadbddd30070f10c920301c190.tar.gz |
man: clarify main.rc-manager=file behavior for resolv.conf as dangling symlink
It's not clear whether this was desired behavior. However, it was
behavior for a long time, so we probably should not change it.
Just document what happens with dangling symlinks.
Diffstat (limited to 'src/dns')
-rw-r--r-- | src/dns/nm-dns-manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 7430365c14..354520b3a7 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -797,6 +797,10 @@ update_resolv_conf (NMDnsManager *self, GError *local = NULL; if (rc_manager == NM_DNS_MANAGER_RESOLV_CONF_MAN_FILE) { + /* Note that if /etc/resolv.conf is a dangling symlink, realpath() + * will return %NULL, and thus below we will replace the symlink + * with a file. This is the only case, in which NetworkManager + * replaces an existing symlink with a file.*/ rc_path_real = realpath (rc_path, NULL); if (rc_path_real) rc_path = rc_path_real; |