mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 16:50:35 +01:00
core: be strict about connection argument for Reapply() D-Bus method
There is no excuse for clients to send connections to NetworkManager that have invalid/unknown fields. Just reject them. As Reapply() is new API in nm-1-1, there is no problem with backward compatibility.
This commit is contained in:
parent
4aa7e09d1f
commit
d4c201272e
1 changed files with 4 additions and 1 deletions
|
|
@ -7369,7 +7369,10 @@ impl_device_reapply (NMDevice *self,
|
|||
|
||||
if (settings && g_variant_n_children (settings)) {
|
||||
/* New settings specified inline. */
|
||||
connection = nm_simple_connection_new_from_dbus (settings, &error);
|
||||
connection = _nm_simple_connection_new_from_dbus (settings,
|
||||
NM_SETTING_PARSE_FLAGS_STRICT
|
||||
| NM_SETTING_PARSE_FLAGS_NORMALIZE,
|
||||
&error);
|
||||
if (!connection) {
|
||||
g_prefix_error (&error, "The settings specified are invalid: ");
|
||||
nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_REAPPLY, self, FALSE, context, error->message);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue