summary refs log tree commit diff
path: root/callouts/nm-dispatcher-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-05-05 17:48:57 +0200
committerMichael Biebl <biebl@debian.org>2015-05-05 17:48:57 +0200
commitf408e27bccfacf347605a8d98649975a68f38a17 (patch)
tree654fd6695c31511baf919b1c0870d119a352ed75 /callouts/nm-dispatcher-utils.c
parent2c032d8f1c6292c1338a615e6ec40252889ba85c (diff)
Imported Upstream version 1.0.2 upstream/1.0.2
Diffstat (limited to 'callouts/nm-dispatcher-utils.c')
-rw-r--r--callouts/nm-dispatcher-utils.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/callouts/nm-dispatcher-utils.c b/callouts/nm-dispatcher-utils.c
index 99616c1a..d8a8e8d8 100644
--- a/callouts/nm-dispatcher-utils.c
+++ b/callouts/nm-dispatcher-utils.c
@@ -210,6 +210,7 @@ construct_device_dhcp4_items (GSList *items, GVariant *dhcp4_config)
 		tmp = g_variant_get_string (val, NULL);
 		items = g_slist_prepend (items, g_strdup_printf ("DHCP4_%s=%s", ucased, tmp));
 		g_free (ucased);
+		g_variant_unref (val);
 	}
 	return items;
 }
@@ -334,6 +335,7 @@ nm_dispatcher_utils_construct_envp (const char *action,
 {
 	const char *iface = NULL, *ip_iface = NULL;
 	const char *uuid = NULL, *id = NULL, *path;
+	const char *filename = NULL;
 	NMDeviceState dev_state = NM_DEVICE_STATE_UNKNOWN;
 	GVariant *value;
 	char **envp = NULL, *path_item;
@@ -349,6 +351,10 @@ nm_dispatcher_utils_construct_envp (const char *action,
 	if (!strcmp (action, "hostname"))
 		goto done;
 
+	/* config filename */
+	if (g_variant_lookup (connection_props, NMD_CONNECTION_PROPS_FILENAME, "&s", &filename))
+		items = g_slist_prepend (items, g_strdup_printf ("CONNECTION_FILENAME=%s", filename));
+
 	/* Canonicalize the VPN interface name; "" is used when passing it through
 	 * D-Bus so make sure that's fixed up here.
 	 */