summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2018-11-02 11:28:26 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2018-11-20 15:15:58 +0100
commit096eef61d499d0d9e7ef198610b75814b2c86a35 (patch)
tree6969b9907f7f927db48ac56373767b42e0f594dc
parent8d5b01619b0518be59d661ed4780f6adeae38a38 (diff)
downloadNetworkManager-096eef61d499d0d9e7ef198610b75814b2c86a35.tar.gz
cli: editor: reload secrets after updating connection
Connection secrets are lost after calling nm_connection_replace_settings_from_connection() because @con_tmp doesn't contain secrets; refetch them like we do when starting the editor.
-rw-r--r--clients/cli/connections.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c
index 88ba3246a7..b8eccaaead 100644
--- a/clients/cli/connections.c
+++ b/clients/cli/connections.c
@@ -7796,9 +7796,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
if (menu_ctx.curr_setting)
s_name = g_strdup (nm_setting_get_name (menu_ctx.curr_setting));
- /* Update settings in the local connection */
+ /* Update settings and secrets in the local connection */
nm_connection_replace_settings_from_connection (connection,
NM_CONNECTION (con_tmp));
+ update_secrets_in_connection (con_tmp, connection);
/* Also update setting for menu context and TAB-completion */
menu_ctx.curr_setting = s_name ? nm_connection_get_setting_by_name (connection, s_name) : NULL;