From: Tobias Brunner Date: Tue, 28 Apr 2020 17:09:15 +0000 (+0200) Subject: nm: Fix password entry for private keys and allow saving it X-Git-Tag: 5.9.0dr1~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=532d5fc85d8c34c059b1eebcab825fa8a00e0300;p=thirdparty%2Fstrongswan.git nm: Fix password entry for private keys and allow saving it On newer desktops the auth dialog is called with --external-ui-mode and it seems that the password flag has to be set, otherwise the password is not stored temporarily in the profile and passed to charon-nm (not sure how this works exactly as need_secrets() is called multiple times even after the password was already entered, only before doing so the last time is the password available in that callback, but only if the flag was set). This now also allows storing the password for the private key with the profile. Fixes #3428. --- diff --git a/src/frontends/gnome/properties/nm-strongswan.c b/src/frontends/gnome/properties/nm-strongswan.c index 81c89c1d8b..07bfb1c563 100644 --- a/src/frontends/gnome/properties/nm-strongswan.c +++ b/src/frontends/gnome/properties/nm-strongswan.c @@ -178,6 +178,7 @@ static void update_cert_fields (StrongswanPluginUiWidgetPrivate *priv, gboolean gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0); /* FALL */ case 0: + update_pass_field (priv, TRUE); cert = key = TRUE; break; case 1: @@ -567,6 +568,8 @@ save_cert (NMSettingVpn *settings, GtkBuilder *builder) { default: case 0: + save_password_and_flags (settings, builder, "passwd-entry", + "password"); cert = key = TRUE; str = "file"; break;