mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
clients/polkit: signal error when polkit setuid helper cannot be spawned
Also the child fds are set to -1 so that nm_close() doesn't throw an assertion.
Fixes: df1d214b2
(clients: polkit-agent: implement polkit agent without using libpolkit)
This commit is contained in:
parent
99a8a49c27
commit
34514b6294
|
@ -552,6 +552,14 @@ begin_authentication (AuthRequest *request)
|
|||
&request->child_stdout,
|
||||
NULL,
|
||||
NULL)) {
|
||||
/* not findind the PolicyKit setuid helper is a critical error */
|
||||
request->child_stdin = -1;
|
||||
request->child_stdout = -1;
|
||||
g_signal_emit (request->listener,
|
||||
signals[ERROR],
|
||||
0,
|
||||
"The PolicyKit setuid helper 'polkit-agent-helper-1' has not been found");
|
||||
|
||||
complete_authentication (request, FALSE);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue