diff options
author | Antonio Cardace <acardace@redhat.com> | 2019-12-24 13:26:54 +0100 |
---|---|---|
committer | Antonio Cardace <acardace@redhat.com> | 2019-12-24 13:39:54 +0100 |
commit | 34514b6294371761316a56f86c0f0adf5cb125bd (patch) | |
tree | 0f915985cbb5ab721cc15ede9a9428b60a18f4fe | |
parent | 99a8a49c270803f3f1993ee8622fbbdad42b1b0a (diff) | |
download | NetworkManager-34514b6294371761316a56f86c0f0adf5cb125bd.tar.gz |
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)
-rw-r--r-- | clients/common/nm-polkit-listener.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clients/common/nm-polkit-listener.c b/clients/common/nm-polkit-listener.c index 3853f6e4d4..6c635e0c0a 100644 --- a/clients/common/nm-polkit-listener.c +++ b/clients/common/nm-polkit-listener.c @@ -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; } |