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.
Showing with 72 additions and 10 deletions