clients: add real property name to NNSecretAgentSimpleSecret

It is necessary to identify secrets uniquely in nmcli.
This commit is contained in:
Jiří Klimeš 2014-11-03 09:53:50 +01:00
parent 801fc34d6f
commit b41cb60b45
2 changed files with 3 additions and 1 deletions

View file

@ -150,6 +150,7 @@ nm_secret_agent_simple_secret_free (NMSecretAgentSimpleSecret *secret)
NMSecretAgentSimpleSecretReal *real = (NMSecretAgentSimpleSecretReal *)secret;
g_free (secret->name);
g_free (secret->prop_name);
g_free (secret->value);
g_free (real->property);
g_clear_object (&real->setting);
@ -167,6 +168,7 @@ nm_secret_agent_simple_secret_new (const char *name,
real = g_slice_new0 (NMSecretAgentSimpleSecretReal);
real->base.name = g_strdup (name);
real->base.prop_name = g_strdup_printf ("%s.%s", nm_setting_get_name (setting), property);
real->base.password = password;
if (setting) {

View file

@ -41,7 +41,7 @@ typedef struct {
} NMSecretAgentSimpleClass;
typedef struct {
char *name, *value;
char *name, *prop_name, *value;
gboolean password;
} NMSecretAgentSimpleSecret;