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.
This commit is contained in:
Dan Williams 2015-05-01 15:15:13 -05:00
parent 9847ab7147
commit 5b1cde1bfc

View file

@ -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);