libnm-util: assume VPN connections need secrets

Because most of the time they will.  They need special handling all
around anyway because only the VPN plugin itself knows whether the
connection needs secrets.
This commit is contained in:
Dan Williams 2011-02-09 00:52:47 -06:00
parent d7a86ffd04
commit b04d9e4675

View file

@ -399,6 +399,13 @@ set_secret_flags (NMSetting *setting,
return TRUE;
}
static GPtrArray *
need_secrets (NMSetting *setting)
{
/* Assume that VPN connections need secrets since they almost always will */
return g_ptr_array_sized_new (1);
}
static void
destroy_one_secret (gpointer data)
{
@ -517,6 +524,7 @@ nm_setting_vpn_class_init (NMSettingVPNClass *setting_class)
parent_class->update_one_secret = update_one_secret;
parent_class->get_secret_flags = get_secret_flags;
parent_class->set_secret_flags = set_secret_flags;
parent_class->need_secrets = need_secrets;
/* Properties */
/**