mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 00:00:08 +01:00
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
(cherry picked from commit 25267f9d27)
This commit is contained in:
parent
4d77df7751
commit
cd30bc1246
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue