mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 14:00:11 +01:00
dns-manager: fail dns config if netconfig exits with non-zero status
If netconfig does not exit with zero status signal, assume
configuration failed and signal an error.
(cherry picked from commit 5f0c23f106)
This commit is contained in:
parent
20ff7d9688
commit
57518271d6
1 changed files with 7 additions and 0 deletions
|
|
@ -330,6 +330,13 @@ dispatch_netconfig (char **searches,
|
|||
strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
if (!WIFEXITED (status) || WEXITSTATUS (status) != EXIT_SUCCESS) {
|
||||
g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_FAILED,
|
||||
"Error calling netconfig: %s %d",
|
||||
WIFEXITED (status) ? "exited with status" : (WIFSIGNALED (status) ? "exited with signal" : "exited with unknown reason"),
|
||||
WIFEXITED (status) ? WEXITSTATUS (status) : (WIFSIGNALED (status) ? WTERMSIG (status) : status));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue