Commit 25267f9d authored by Thomas Haller's avatar Thomas Haller
Browse files

dns: don't stat relative paths when detecting resolved use

NetworkManager daemon has no defined working directory.
It makes no sense to ever open or stat relative paths.
Just skip them.

https://bugzilla.gnome.org/show_bug.cgi?id=790446
parent e09503dc
......@@ -1594,7 +1594,10 @@ _resolvconf_resolved_managed (void)
/* see if resolv.conf resolves to one of the candidate
* paths (or whether it is hard-linked). */
for (i = 0; i < G_N_ELEMENTS (RESOLVED_PATHS); i++) {
if ( stat (RESOLVED_PATHS[i], &st_test) == 0
const char *p = RESOLVED_PATHS[i];
if ( p[0] == '/'
&& stat (p, &st_test) == 0
&& st.st_dev == st_test.st_dev
&& st.st_ino == st_test.st_ino)
return TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment