about summary refs log tree commit diff
path: root/pkgs/tools/networking/network-manager/hardcode-gsettings.patch
blob: a480fd6d91e70419bc6394582cd8dbca770b0575 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index 2e9daa23..6663b3ce 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -265,8 +265,11 @@ eap_method_ca_cert_ignore_get (EAPMethod *method, NMConnection *connection)
 static GSettings *
 _get_ca_ignore_settings (NMConnection *connection)
 {
+	GSettingsSchemaSource *schema_source;
+	g_autoptr (GSettingsSchema) *schema;
 	GSettings *settings;
-	char *path = NULL;
+
+	g_autofree char *path = NULL;
 	const char *uuid;
 
 	g_return_val_if_fail (connection, NULL);
@@ -274,9 +277,12 @@ _get_ca_ignore_settings (NMConnection *connection)
 	uuid = nm_connection_get_uuid (connection);
 	g_return_val_if_fail (uuid && *uuid, NULL);
 
+	schema_source = g_settings_schema_source_new_from_directory ("@NM_APPLET_GSETTINGS@", g_settings_schema_source_get_default (), TRUE, NULL);
+	schema = g_settings_schema_source_lookup (schema_source, "org.gnome.nm-applet.eap", FALSE);
+	g_settings_schema_source_unref (schema_source);
+
 	path = g_strdup_printf ("/org/gnome/nm-applet/eap/%s/", uuid);
-	settings = g_settings_new_with_path ("org.gnome.nm-applet.eap", path);
-	g_free (path);
+	settings = g_settings_new_full (schema, NULL, path);
 
 	return settings;
 }