vpn-secrets.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From 4562a431ad976a3e0df38889d48bb7898f91c672 Mon Sep 17 00:00:00 2001
  2. From: Lubomir Rintel <lkundrak@v3.sk>
  3. Date: Tue, 26 Jan 2016 17:31:34 +0100
  4. Subject: NetworkAgent: correctly identify the VPN secret requests
  5. The non-interactive requests for 'vpn' settings are forwarded to the UI because
  6. it is able to talk to the auth helpers. However, the VPN requests are identified
  7. by the connection type instead of setting type. That is incorrect and the UI
  8. is not prepared to handle such requests; tries to construct a dialog and fails
  9. miserably:
  10. Gjs-Message: JS LOG: Invalid connection type: vpn
  11. (gnome-shell:13133): Gjs-WARNING **: JS ERROR: Error: No property 'text' in property list (or its value was undefined)
  12. NetworkSecretDialog<._init@resource:///org/gnome/shell/ui/components/networkAgent.js:60
  13. wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  14. _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110
  15. Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204
  16. NetworkAgent<._handleRequest@resource:///org/gnome/shell/ui/components/networkAgent.js:724
  17. wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  18. NetworkAgent<._newRequest@resource:///org/gnome/shell/ui/components/networkAgent.js:715
  19. wrapper@resource:///org/gnome/gjs/modules/lang.js:169
  20. https://bugzilla.gnome.org/show_bug.cgi?id=760999
  21. ---
  22. src/shell-network-agent.c | 7 +------
  23. 1 file changed, 1 insertion(+), 6 deletions(-)
  24. diff --git a/src/shell-network-agent.c b/src/shell-network-agent.c
  25. index c6f4b79..8e8c548 100644
  26. --- a/src/shell-network-agent.c
  27. +++ b/src/shell-network-agent.c
  28. @@ -366,8 +366,6 @@ shell_network_agent_get_secrets (NMSecretAgent *agent,
  29. {
  30. ShellNetworkAgent *self = SHELL_NETWORK_AGENT (agent);
  31. ShellAgentRequest *request;
  32. - NMSettingConnection *setting_connection;
  33. - const char *connection_type;
  34. GHashTable *attributes;
  35. char *request_id;
  36. @@ -381,9 +379,6 @@ shell_network_agent_get_secrets (NMSecretAgent *agent,
  37. shell_agent_request_cancel (request);
  38. }
  39. - setting_connection = nm_connection_get_setting_connection (connection);
  40. - connection_type = nm_setting_connection_get_connection_type (setting_connection);
  41. -
  42. request = g_slice_new (ShellAgentRequest);
  43. request->self = g_object_ref (self);
  44. request->cancellable = g_cancellable_new ();
  45. @@ -393,7 +388,7 @@ shell_network_agent_get_secrets (NMSecretAgent *agent,
  46. request->flags = flags;
  47. request->callback = callback;
  48. request->callback_data = callback_data;
  49. - request->is_vpn = !strcmp(connection_type, NM_SETTING_VPN_SETTING_NAME);
  50. + request->is_vpn = !strcmp(setting_name, NM_SETTING_VPN_SETTING_NAME);
  51. request->entries = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, gvalue_destroy_notify);
  52. if (request->is_vpn)
  53. --
  54. cgit v0.11.2