NetworkManager/src
Thomas Haller 423e83b880
keyfile: reject non-normalized UUIDs in nms_keyfile_nmmeta_check_filename()
Since commit 207cf3d5d4 ('libnm: normalize "connection.uuid"') the
"connection.uuid" is normalized to be a valid UUID and all lower case.

That means, if we have .nmmeta files on disk with a previously valid,
but now invalid UUID, the meta file is no longer going to match.

Reject such file outright as invalid. If we really wanted to preserve
backward compatibility, then we would have to also normalize the
filename when we read it. However, that means, that suddenly we might
have any number of compatible .nmmeta files that normalize to the same
UUID, like the files

  71088c75dec54119ab41be71bc10e736aaaabbbb.nmmeta
  F95D40B4-578A-5E68-8597-39392249442B.nmmeta
  f95d40b4-578a-5e68-8597-39392249442b.nmmeta

Having multiple places for the nmmeta file is complicated to handle.

Also, we often have the connection profile (and the normalized UUID)
first, and then check whether it has a .nmmeta file. If we would support
those unnormalized file names, we would have to visit all file names and
try to normalize it, to find those with a matching UUID.

Non-normalized UUIDs really should not be used and they already are not
working anymore for the .nmmeta file. This commit only outright rejects
them. This is a change in behavior, but the behavior change happened
earlier when we started normalizing "connection.uuid".
2021-06-04 09:29:22 +02:00
..
c-list build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-rbtree build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-siphash build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
c-stdaux build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
contrib clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
core keyfile: reject non-normalized UUIDs in nms_keyfile_nmmeta_check_filename() 2021-06-04 09:29:22 +02:00
libnm-base lgtm: suppress lgtm[cpp/duplicate-include-guard] warning in ethtool header 2021-06-01 17:54:07 +02:00
libnm-client-aux-extern build: move "clients/common/" to "src/libnmc-{base,setting}/" 2021-03-02 08:38:25 +01:00
libnm-client-impl Revert "libnm: introduce the new get_ports() in bridge/bond API" 2021-06-02 12:05:26 +02:00
libnm-client-public Revert "libnm: introduce the new get_ports() in bridge/bond API" 2021-06-02 12:05:26 +02:00
libnm-client-test build/meson: cleanup dependencies for libnm-core-aux-intern 2021-02-28 10:42:05 +01:00
libnm-core-aux-extern build/meson: cleanup dependencies for libnm-core-aux-extern 2021-02-28 10:42:06 +01:00
libnm-core-aux-intern libnm: add nm_auto_unref_tc_action cleanup macro for NMTCAction 2021-05-11 13:56:45 +02:00
libnm-core-impl ifcfg-rh: preserve an empty tc configuration 2021-06-03 09:02:07 +02:00
libnm-core-intern libnm/trivial: rename _nm_keyfile_equals() to _nm_keyfile_equal() 2021-05-27 09:56:41 +02:00
libnm-core-public ethtool: Introducing PAUSE support 2021-05-12 18:04:46 +02:00
libnm-glib-aux glib-aux: change nm_uuid_is_valid_full() to nm_uuid_is_normalized_full() 2021-06-04 09:29:22 +02:00
libnm-log-core logging: add _nm_log_full() macro 2021-04-12 16:46:01 +02:00
libnm-log-null build: remove shared/ directory 2021-02-24 12:49:13 +01:00
libnm-platform platform/netlink: don't reallocate ancillary data for recvmsg() on truncation 2021-06-01 09:37:36 +02:00
libnm-std-aux clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
libnm-systemd-core systemd: merge branch systemd into main 2021-06-01 14:26:51 +02:00
libnm-systemd-shared systemd: merge branch systemd into main 2021-06-01 14:26:51 +02:00
libnm-udev-aux build/meson: cleanup dependencies for libnm-udev-aux 2021-02-28 10:42:04 +01:00
libnmc-base libnmc-base: make transfer of memory ownership in try_spawn_vpn_auth_helper() clearer 2021-05-27 10:42:10 +02:00
libnmc-setting core,libnm: don't touch device TC configuration by default 2021-06-03 09:01:57 +02:00
libnmt-newt libnmt-newt: use cleanup macro in nmt_newt_button_build_component() 2021-05-11 13:56:50 +02:00
linux-headers platform: move "linux/nl802154.h" to "src/linux-headers/" 2021-03-05 11:27:15 +01:00
n-acd build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
n-dhcp4 build: move c-util/nettools library from "shared/" to "src/" 2021-02-24 12:48:28 +01:00
nm-cloud-setup clang-format: reformat code with clang 12 2021-05-04 13:56:26 +02:00
nm-dispatcher dispatcher: set G_LOG_DOMAIN to "nm-dispatcher" 2021-03-18 16:54:00 +01:00
nm-initrd-generator all: only include "libnm-glib-aux/nm-uuid.h" where needed 2021-05-04 15:51:51 +02:00
nm-online build: move "clients/nm-online.c" to "src/nm-online/" 2021-03-02 08:38:26 +01:00
nmcli core,libnm: don't touch device TC configuration by default 2021-06-03 09:01:57 +02:00
nmtui tui: use internal _nm_utils_ip4_prefix_to_netmask() helper 2021-05-11 13:56:48 +02:00
tests/client cli: handle empty/unset values for "gsm.apn" property 2021-05-03 10:11:25 +02:00
meson.build systemd: move "src/core/systemd" to "src/libnm-systemd-core" 2021-05-30 09:45:05 +02:00