diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-09-15 09:40:03 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-09-15 09:40:03 +0200 |
commit | 2a391348b6906a728d68ef5758b6bf102318986a (patch) | |
tree | 2a182bcb3b7743192bddafe2d1f0d860ab499772 | |
parent | 73c649f365010eb22d9e574d7c9471dcd9776a24 (diff) | |
download | NetworkManager-2a391348b6906a728d68ef5758b6bf102318986a.tar.gz |
clients: fix check on secret request path
priv->path is NULL when the agent handles all requests (for example
when executing "nmcli agent").
Fixes: f3099db28e193a4c3736a651af2d10102cc39853
-rw-r--r-- | clients/common/nm-secret-agent-simple.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c index 550fefa809..4e59f489f0 100644 --- a/clients/common/nm-secret-agent-simple.c +++ b/clients/common/nm-secret-agent-simple.c @@ -438,7 +438,7 @@ request_secrets_from_ui (NMSecretAgentSimpleRequest *request) g_return_if_fail (priv->enabled); /* We only handle requests for connection with @path if set. */ - if (!g_str_has_prefix (request->request_id, priv->path)) { + if (priv->path && !g_str_has_prefix (request->request_id, priv->path)) { gs_free_error GError *error = NULL; error = g_error_new (NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_FAILED, |