From 4d77df775195e78eae144ad26bee1d312201a88c Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Sun, 19 Nov 2017 13:07:13 +0100 Subject: [PATCH] dns: check for relative paths and stub-resolve.conf when detecting systemd-resolved Fix resolved detection, the symlink target is usually relative to the root, such that in chroots the file points to a file inside the chroot. But keep absolute targets too, as these may have been in use with older version of systemd. Add support for stub-resolv.conf detection. https://bugzilla.gnome.org/show_bug.cgi?id=790446 (cherry picked from commit e09503dcc43039905018b26304bfe94287211aa6) --- src/dns/nm-dns-manager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 5aa61e40b6..e6075d03fe 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -1535,6 +1535,11 @@ static gboolean _resolvconf_resolved_managed (void) { static const char *const RESOLVED_PATHS[] = { + "../run/systemd/resolve/stub-resolv.conf", + "../run/systemd/resolve/resolv.conf", + "../lib/systemd/resolv.conf", + "../usr/lib/systemd/resolv.conf", + "/run/systemd/resolve/stub-resolv.conf", "/run/systemd/resolve/resolv.conf", "/lib/systemd/resolv.conf", "/usr/lib/systemd/resolv.conf",