[NetworkManager-openvpn/bg/ask-username: 6/7] service: ask again username with password



commit 61422fcc3be65391b364ab1257e9e9373dbedcb2
Author: Beniamino Galvani <bgalvani redhat com>
Date:   Fri Oct 12 21:50:54 2018 +0200

    service: ask again username with password
    
    If the password authentication fails, there are chances that the
    username was wrong. Pass the username hint back to NM, that will
    decide if it must be asked according to the vpn.ask-user-name
    property.

 src/nm-openvpn-service.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 7d0fe35..b0c3ff6 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -918,8 +918,9 @@ handle_auth (NMOpenvpnPluginIOData *io_data,
                } else {
                        hints = g_new0 (const char *, 3);
 
+                       hints[i++] = "x-vpn-interactive-username";
                        hints[i++] = NM_OPENVPN_KEY_PASSWORD;
-                       *out_message = _("A password is required.");
+                       *out_message = _("Credentials are required.");
 
                        /* FIXME: this is wrong, we can't reuse the password
                         * hint for the challenge. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]