mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-05 13:50:15 +01:00
secret-agent-simple: pass hints to the auth dialog
This commit is contained in:
parent
6021ddb349
commit
ee73c560b9
1 changed files with 9 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
@ -782,6 +783,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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue