diff options
Diffstat (limited to 'src/settings/plugins/keyfile/nms-keyfile-writer.c')
| -rw-r--r-- | src/settings/plugins/keyfile/nms-keyfile-writer.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/settings/plugins/keyfile/nms-keyfile-writer.c b/src/settings/plugins/keyfile/nms-keyfile-writer.c index 270a217e..194b97d4 100644 --- a/src/settings/plugins/keyfile/nms-keyfile-writer.c +++ b/src/settings/plugins/keyfile/nms-keyfile-writer.c @@ -34,6 +34,8 @@ #include "nms-keyfile-utils.h" #include "nms-keyfile-reader.h" +#include "nm-utils/nm-io-utils.h" + /*****************************************************************************/ typedef struct { @@ -127,7 +129,7 @@ cert_writer (NMConnection *connection, new_path = g_strdup_printf ("%s/%s-%s.%s", info->keyfile_dir, nm_connection_get_uuid (connection), cert_data->vtable->file_suffix, ext); - success = nm_utils_file_set_contents (new_path, (const gchar *) blob_data, + success = nm_utils_file_set_contents (new_path, (const char *) blob_data, blob_len, 0600, &local); if (success) { /* Write the path value to the keyfile. @@ -297,11 +299,6 @@ _internal_write_connection (NMConnection *connection, return FALSE; } - if (out_path && g_strcmp0 (existing_path, path)) { - *out_path = path; /* pass path out to caller */ - path = NULL; - } - if (out_reread || out_reread_same) { gs_unref_object NMConnection *reread = NULL; @@ -333,6 +330,8 @@ _internal_write_connection (NMConnection *connection, NM_SET_OUT (out_reread_same, reread_same); } + NM_SET_OUT (out_path, g_steal_pointer (&path)); + return TRUE; } |