NetworkManager/src/core/settings
Beniamino Galvani 024360bffa settings: fix check on existing system secrets
The previous check was based only on the presence of a non-NULL
"existing_secrets" GVariant. That GVariant is created via:

  nm_connection_to_dbus(nm_settings_connection_get_connection(self),
                        NM_CONNECTION_SERIALIZE_WITH_SECRETS_SYSTEM_OWNED)

The function returns a GVariant containing a first-level dictionary
for each setting, even for those that doesn't contain any secrets. As
a result, the check was requiring the system.modify permission even if
there weren't any cached secrets to send to the agent.

Fix the check to actually check for the presence of any secrets in the
cached dictionary. Some connection types have a third-level
dictionary that can be empty, for example VPNs have vpn.secrets.
2026-02-25 09:05:04 +01:00
..
plugins libnm,nmcli: add a new ipv4.clat property 2026-01-24 09:41:58 +01:00
nm-agent-manager.c settings: fix check on existing system secrets 2026-02-25 09:05:04 +01:00
nm-agent-manager.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-secret-agent.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-secret-agent.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-settings-connection.c settings: accept not-saved secrets from agents without modify-system 2026-02-24 08:46:32 +01:00
nm-settings-connection.h settings: add nm_settings_connection_persist_mode_to_string() 2024-05-02 16:49:16 +02:00
nm-settings-plugin.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-settings-plugin.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-settings-storage.c all: use nm_uuid_is_normalized() for checking valid UUID for "connection.uuid" 2021-06-04 09:29:23 +02:00
nm-settings-storage.h settings: document some data structures 2025-10-21 15:31:58 +02:00
nm-settings-utils.c format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-settings-utils.h format: run nm-code-format 2024-10-04 11:07:35 +02:00
nm-settings.c settings: document some data structures 2025-10-21 15:31:58 +02:00
nm-settings.h core: expose accessors to NMManager in NMSettings, NMSettingsConnection, NMDevice 2023-02-22 22:38:03 +00:00