mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 20:45:32 +00:00
libnm-util: update CDMA, GSM, and PPPoE settings for NOT_REQUIRED secrets
This commit is contained in:
parent
99766efbdc
commit
bad3377131
|
@ -237,9 +237,11 @@ need_secrets (NMSetting *setting)
|
|||
return NULL;
|
||||
|
||||
if (priv->username) {
|
||||
if (!(priv->password_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) {
|
||||
secrets = g_ptr_array_sized_new (1);
|
||||
g_ptr_array_add (secrets, NM_SETTING_CDMA_PASSWORD);
|
||||
}
|
||||
}
|
||||
|
||||
return secrets;
|
||||
}
|
||||
|
|
|
@ -327,9 +327,11 @@ need_secrets (NMSetting *setting)
|
|||
return NULL;
|
||||
|
||||
if (priv->username) {
|
||||
if (!(priv->password_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) {
|
||||
secrets = g_ptr_array_sized_new (1);
|
||||
g_ptr_array_add (secrets, NM_SETTING_GSM_PASSWORD);
|
||||
}
|
||||
}
|
||||
|
||||
return secrets;
|
||||
}
|
||||
|
|
|
@ -163,13 +163,15 @@ static GPtrArray *
|
|||
need_secrets (NMSetting *setting)
|
||||
{
|
||||
NMSettingPPPOEPrivate *priv = NM_SETTING_PPPOE_GET_PRIVATE (setting);
|
||||
GPtrArray *secrets;
|
||||
GPtrArray *secrets = NULL;
|
||||
|
||||
if (priv->password)
|
||||
return NULL;
|
||||
|
||||
if (!(priv->password_flags & NM_SETTING_SECRET_FLAG_NOT_REQUIRED)) {
|
||||
secrets = g_ptr_array_sized_new (1);
|
||||
g_ptr_array_add (secrets, NM_SETTING_PPPOE_PASSWORD);
|
||||
}
|
||||
|
||||
return secrets;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue