clients: fix check on secret request path

priv->path is NULL when the agent handles all requests (for example
when executing "nmcli agent").

Fixes: f3099db28e
(cherry picked from commit 2a391348b6)
This commit is contained in:
Beniamino Galvani 2016-09-15 09:40:03 +02:00
parent 1064dcafbe
commit 5dfb3ec72c

View file

@ -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,