summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-04-02 08:59:08 +0200
committerLubomir Rintel <lkundrak@v3.sk>2019-04-02 09:03:21 +0200
commit13dd64846babff4194d5cf5e79ac9b98ffbbd7f5 (patch)
tree77a1585e32a93d97a7b8da7d545dba01aa2cb471
parentb29b4f8d89ef2003d67891ee5b5a97be2870b3b3 (diff)
downloadNetworkManager-lr/agent-hints.tar.gz
secret-agent-simple: pass hints to the auth dialoglr/agent-hints
-rw-r--r--clients/common/nm-secret-agent-simple.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clients/common/nm-secret-agent-simple.c b/clients/common/nm-secret-agent-simple.c
index 5e68aa4f28..420d2e79e4 100644
--- a/clients/common/nm-secret-agent-simple.c
+++ b/clients/common/nm-secret-agent-simple.c
@@ -754,6 +754,7 @@ try_spawn_vpn_auth_helper (RequestData *request,
char *auth_dialog_request_str;
gsize auth_dialog_request_len;
AuthDialogData *data;
+ int i;
plugin_info = nm_vpn_plugin_info_list_find_by_service (nm_vpn_get_plugin_infos (),
nm_setting_vpn_get_service_type (s_vpn));
@@ -780,6 +781,14 @@ try_spawn_vpn_auth_helper (RequestData *request,
if (request->flags & NM_SECRET_AGENT_GET_SECRETS_FLAG_REQUEST_NEW)
g_ptr_array_add (auth_dialog_argv, "-r");
+ s = nm_vpn_plugin_info_lookup_property (plugin_info, "GNOME", "supports-hints");
+ if (_nm_utils_ascii_str_to_bool (s, FALSE)) {
+ for (i = 0; request->hints[i]; i++) {
+ g_ptr_array_add (auth_dialog_argv, "-t");
+ g_ptr_array_add (auth_dialog_argv, request->hints[i]);
+ }
+ }
+
g_ptr_array_add (auth_dialog_argv, NULL);
if (!g_spawn_async_with_pipes (NULL, (char **) auth_dialog_argv->pdata, NULL,
G_SPAWN_DO_NOT_REAP_CHILD,