diff options
author | Thomas Haller <thaller@redhat.com> | 2014-03-10 12:00:50 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-16 13:27:26 +0200 |
commit | d041775501970e03e161263d65130479132cb182 (patch) | |
tree | 3c467707e2338a010c9671255c7d594aef7b7f1d | |
parent | 1553607223f003b6e11bea40168c42bc2ffc3216 (diff) | |
download | NetworkManager-d041775501970e03e161263d65130479132cb182.tar.gz |
keyfile: assert that the connection to be written verifies
Related: https://bugzilla.redhat.com/show_bug.cgi?id=979425
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/settings/plugins/keyfile/writer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/settings/plugins/keyfile/writer.c b/src/settings/plugins/keyfile/writer.c index 9dd49c7762..5f3ebe25f4 100644 --- a/src/settings/plugins/keyfile/writer.c +++ b/src/settings/plugins/keyfile/writer.c @@ -1015,6 +1015,11 @@ _internal_write_connection (NMConnection *connection, if (out_path) g_return_val_if_fail (*out_path == NULL, FALSE); + if (!nm_connection_verify (connection, error)) { + g_return_val_if_reached (FALSE); + return FALSE; + } + id = nm_connection_get_id (connection); if (!id) { g_set_error (error, KEYFILE_PLUGIN_ERROR, 0, |