Commit 096eef61 authored by Beniamino Galvani's avatar Beniamino Galvani

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.
parent 8d5b0161
...@@ -7796,9 +7796,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t ...@@ -7796,9 +7796,10 @@ editor_menu_main (NmCli *nmc, NMConnection *connection, const char *connection_t
if (menu_ctx.curr_setting) if (menu_ctx.curr_setting)
s_name = g_strdup (nm_setting_get_name (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_replace_settings_from_connection (connection,
NM_CONNECTION (con_tmp)); NM_CONNECTION (con_tmp));
update_secrets_in_connection (con_tmp, connection);
/* Also update setting for menu context and TAB-completion */ /* 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; menu_ctx.curr_setting = s_name ? nm_connection_get_setting_by_name (connection, s_name) : NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment