charon-nm: No additional secrets are required once a password has been entered
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Mar 2014 13:49:14 +0000 (14:49 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Mar 2014 13:53:40 +0000 (14:53 +0100)
Recent versions of NM will call need_secrets() as long as it returns TRUE,
but then fail as the number of calls is limited by an assert.

Fixes #547.

src/charon-nm/nm/nm_service.c

index f0daff6..3ee885a 100644 (file)
@@ -660,6 +660,10 @@ static gboolean need_secrets(NMVPNPlugin *plugin, NMConnection *connection,
                                        key->destroy(key);
                                        return FALSE;
                                }
+                               else if (nm_setting_vpn_get_secret(settings, "password"))
+                               {
+                                       return FALSE;
+                               }
                        }
                }
                else if (streq(method, "smartcard"))