mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 05:18:23 +02:00
core: verify secrets when adding connection via D-Bus (bgo #757843)
Fixes: dbbedce21f
libnm: don't check for valid passwords in NMSetting:verify()
https://bugzilla.gnome.org/show_bug.cgi?id=757843
This commit is contained in:
parent
b41b32cb7b
commit
0f6baeef35
1 changed files with 9 additions and 3 deletions
|
|
@ -1407,7 +1407,11 @@ impl_settings_add_connection_helper (NMSettings *self,
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
connection = nm_simple_connection_new_from_dbus (settings, &error);
|
connection = nm_simple_connection_new_from_dbus (settings, &error);
|
||||||
|
|
||||||
if (connection) {
|
if (connection) {
|
||||||
|
if (!nm_connection_verify_secrets (connection, &error))
|
||||||
|
goto failure;
|
||||||
|
|
||||||
nm_settings_add_connection_dbus (self,
|
nm_settings_add_connection_dbus (self,
|
||||||
connection,
|
connection,
|
||||||
save_to_disk,
|
save_to_disk,
|
||||||
|
|
@ -1415,10 +1419,12 @@ impl_settings_add_connection_helper (NMSettings *self,
|
||||||
impl_settings_add_connection_add_cb,
|
impl_settings_add_connection_add_cb,
|
||||||
NULL);
|
NULL);
|
||||||
g_object_unref (connection);
|
g_object_unref (connection);
|
||||||
} else {
|
return;
|
||||||
g_assert (error);
|
|
||||||
g_dbus_method_invocation_take_error (context, error);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
failure:
|
||||||
|
g_assert (error);
|
||||||
|
g_dbus_method_invocation_take_error (context, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue