summarylogtreecommitdiffstats
path: root/enable-local-password-storage.patch
blob: 22ff682c81a10b5413ce4c8e47287059d58419b6 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff -Naur network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-leap.c network-manager-applet-1.4.0/src/wireless-security/eap-method-leap.c
--- network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-leap.c	2016-07-25 14:41:01.000000000 +0300
+++ network-manager-applet-1.4.0/src/wireless-security/eap-method-leap.c	2016-09-07 00:42:00.956063332 +0300
@@ -119,9 +119,11 @@
 	                             secret_flags, NULL);
 
 	/* Update secret flags and popup when editing the connection */
-	if (method->editing_connection)
+	if (method->editing_connection) {
 		nma_utils_update_password_storage (passwd_entry, secret_flags,
 		                                   NM_SETTING (s_8021x), parent->password_flags_name);
+		g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_NONE, NULL);
+	}
 }
 
 static void
diff -Naur network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-simple.c network-manager-applet-1.4.0/src/wireless-security/eap-method-simple.c
--- network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-simple.c	2016-07-25 14:41:01.000000000 +0300
+++ network-manager-applet-1.4.0/src/wireless-security/eap-method-simple.c	2016-09-07 00:44:31.236065406 +0300
@@ -181,6 +181,7 @@
 
 		nma_utils_update_password_storage (passwd_entry, flags,
 		                                   NM_SETTING (s_8021x), parent->password_flags_name);
+		g_object_set (s_8021x, NM_SETTING_802_1X_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_NONE, NULL);
 	}
 }
 
diff -Naur network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-tls.c network-manager-applet-1.4.0/src/wireless-security/eap-method-tls.c
--- network-manager-applet-1.4.0.orig/src/wireless-security/eap-method-tls.c	2016-07-25 14:41:01.000000000 +0300
+++ network-manager-applet-1.4.0/src/wireless-security/eap-method-tls.c	2016-09-07 00:50:17.012736832 +0300
@@ -177,6 +177,7 @@
 	const char *password = NULL;
 	GError *error = NULL;
 	gboolean ca_cert_error = FALSE;
+	const char *secret_flag_prop = NULL;
 
 	s_8021x = nm_connection_get_setting_802_1x (connection);
 	g_assert (s_8021x);
@@ -207,11 +208,13 @@
 			g_warning ("Couldn't read phase2 private key '%s': %s", pk_filename, error ? error->message : "(unknown)");
 			g_clear_error (&error);
 		}
+		secret_flag_prop = NM_SETTING_802_1X_PHASE2_PRIVATE_KEY_PASSWORD_FLAGS;
 	} else {
 		if (!nm_setting_802_1x_set_private_key (s_8021x, pk_filename, password, NM_SETTING_802_1X_CK_SCHEME_PATH, &format, &error)) {
 			g_warning ("Couldn't read private key '%s': %s", pk_filename, error ? error->message : "(unknown)");
 			g_clear_error (&error);
 		}
+		secret_flag_prop = NM_SETTING_802_1X_PRIVATE_KEY_PASSWORD_FLAGS;
 	}
 	g_free (pk_filename);
 
@@ -224,6 +227,7 @@
 	if (method->editing_connection) {
 		nma_utils_update_password_storage (passwd_entry, secret_flags,
 		                                   NM_SETTING (s_8021x), parent->password_flags_name);
+		g_object_set (s_8021x, secret_flag_prop, NM_SETTING_SECRET_FLAG_NONE, NULL);
 	}
 
 	/* TLS client certificate */
diff -Naur network-manager-applet-1.4.0.orig/src/wireless-security/ws-leap.c network-manager-applet-1.4.0/src/wireless-security/ws-leap.c
--- network-manager-applet-1.4.0.orig/src/wireless-security/ws-leap.c	2016-07-25 14:41:01.000000000 +0300
+++ network-manager-applet-1.4.0/src/wireless-security/ws-leap.c	2016-09-07 00:52:11.662738418 +0300
@@ -125,9 +125,11 @@
 	                             secret_flags, NULL);
 
 	/* Update secret flags and popup when editing the connection */
-	if (sec->editing_connection)
+	if (sec->editing_connection) {
 		nma_utils_update_password_storage (passwd_entry, secret_flags,
 		                                   NM_SETTING (s_wireless_sec), sec->password_flags_name);
+		g_object_set (s_wireless_sec, NM_SETTING_WIRELESS_SECURITY_LEAP_PASSWORD_FLAGS, NM_SETTING_SECRET_FLAG_NONE, NULL);
+	}
 }
 
 static void
--- network-manager-applet-1.4.0/src/wireless-security/wireless-security.c.orig	2016-09-07 01:14:47.512757117 +0300
+++ network-manager-applet-1.4.0/src/wireless-security/wireless-security.c	2016-09-07 01:15:19.869424223 +0300
@@ -541,7 +541,7 @@
 	if (s_8021x)
 		nm_setting_get_secret_flags (NM_SETTING (s_8021x), eap->password_flags_name, &secret_flags, NULL);
 	else
-		secret_flags = NM_SETTING_SECRET_FLAG_AGENT_OWNED;
+		secret_flags = NM_SETTING_SECRET_FLAG_NONE;
 
 	/* Blow away the old wireless security setting by adding a clear one */
 	s_wireless_sec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new ();