NetworkManager/src/settings/plugins/keyfile
Thomas Haller 1b0fd9fae0 keyfile: read_connections() must skip duplicate connections
If there are keyfiles with duplicate UUIDs, read_connections()
would iterate over the files, loading them as they appear and
overwriting duplicate connections that were just loaded.

For example, have keyfiles 'A' and 'B' with the same UUID.
On start, NM might first load 'A', then 'B'. 'B' would replace the
content of 'A' which was just loaded.
On reload, NM would first overwrite 'B' with 'A', and then again
overwriting 'A' with 'B'.

Fix that by accept the first found connection and don't overwrite
it during the same read_connections() run.

Also sort the files by file modification timestamp so that we
get a reproducible and sensible behavior.

(cherry picked from commit 8a4e64c6aa)
2015-03-11 17:07:55 +01:00
..
tests keyfile/writer: fix password_raw_writer() to write NMSetting8021x:password-raw 2015-02-19 13:13:07 +01:00
common.h settings: drop plugin-specific error domains 2014-10-22 08:29:09 -04:00
Makefile.am settings: drop plugin-specific error domains 2014-10-22 08:29:09 -04:00
nm-keyfile-connection.c settings: log connection diffs in replace_settings only where appropriate 2015-03-11 17:07:55 +01:00
nm-keyfile-connection.h settings: add NMSettingsConnection:filename 2015-01-14 11:35:17 -05:00
plugin.c keyfile: read_connections() must skip duplicate connections 2015-03-11 17:07:55 +01:00
plugin.h settings: drop plugin-specific error domains 2014-10-22 08:29:09 -04:00
reader.c settings: change algorithm for UUID generation based on strings 2014-12-04 17:02:22 +01:00
reader.h settings: move system-settings/plugins => src/settings/plugins 2011-02-15 11:55:34 -06:00
utils.c all: consistently include config.h 2014-11-13 17:18:42 -05:00
utils.h keyfile: fix handling of enum/flags properties after fcfb4b40 (bgo #738585) 2014-10-16 19:17:18 -05:00
writer.c keyfile: simplify g_return() checks for _internal_write_connection() 2015-03-11 17:07:55 +01:00
writer.h settings: move system-settings/plugins => src/settings/plugins 2011-02-15 11:55:34 -06:00