• Thomas Haller's avatar
    settings: avoid duplicate UUID in settings · 7b807b11
    Thomas Haller authored
    When adding a connection to NMSettings we did not check for
    duplicate connection UUIDs (which could for example happen
    if two different plugins report a conflicting UUID).
    Also, we would not check that an already added connection
    changes it's UUID.
    
    Both could lead to have duplicate connections (by UUID).
    
    Avoid that two ways:
    - when adding a connection to NMSettings, ensure that we don't add
      a conflicting UUID. Otherwise just bail out and do nothing.
    - when modifying a connection that is already added to NMSettings,
      enforce that the UUID cannot change. Otherwise fail with error.
    
    For ifcfg-rh plugin this situation still can happen during reload.
    In this case error out and refuse to update the connection. After
    all, the user configured invalid UUIDs.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1171751
    7b807b11
nm-settings-connection.c 81.2 KB