From 5b1cde1bfc5aa4d8e8219ee66ff637af7e62a2ec Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 1 May 2015 15:15:13 -0500 Subject: [PATCH] vpn: don't fail if no system secrets exist The VPN connection requests secrets a few times; first it retrieves only system-owned secrets to see if they are sufficient (and thus doesn't need to bother the user), then it retrieves existing agent owned secrets (so the user doesn't get a popup), then finally if those aren't sufficient it asks the user interactively. But if there was some error retrieving system secrets, or if there weren't any system secrets at all, don't fail the VPN connection. Just go on and ask the user for the secrets. --- src/vpn-manager/nm-vpn-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index d24080452c..4329cb29f8 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -1937,7 +1937,7 @@ get_secrets_cb (NMSettingsConnection *connection, priv->secrets_id = 0; - if (error) { + if (error && priv->secrets_idx >= SECRETS_REQ_NEW) { nm_log_err (LOGD_VPN, "Failed to request VPN secrets #%d: (%d) %s", priv->secrets_idx + 1, error->code, error->message); _set_vpn_state (self, STATE_FAILED, NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, FALSE);