aboutsummaryrefslogtreecommitdiff
path: root/debian/patches/01_clear_servers.patch
blob: 187113d42c19bbb3b998b80310a5190589d084a0 (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
Description: fix credentials disclosure via second login
Origin: upstream, http://bazaar.launchpad.net/~remote-login-service-team/remote-login-service/trunk/revision/77
Bug: https://bugs.launchpad.net/ubuntu/quantal/+source/remote-login-service/+bug/1070896

=== modified file 'src/uccs-server.c'
--- old/src/uccs-server.c	2012-09-17 07:49:30 +0000
+++ new/src/uccs-server.c	2012-10-24 14:35:36 +0000
@@ -466,6 +466,10 @@
 static gboolean
 parse_rds_array (UccsServer * server, JsonArray * array)
 {
+	// Got a new set of servers, delete the old one
+	g_list_free_full(server->subservers, g_object_unref);
+	server->subservers = NULL; 
+
 	int i;
 	for (i = 0; i < json_array_get_length(array); i++) {
 		JsonNode * node = json_array_get_element(array, i);

=== modified file 'tests/dbus-interface.c'
--- old/tests/dbus-interface.c	2012-09-17 07:49:30 +0000
+++ new/tests/dbus-interface.c	2012-10-24 14:35:36 +0000
@@ -184,9 +184,12 @@
 
 	GVariant * array = g_variant_get_child_value(retval, 2);
 	int i;
+	// Check all servers should be in the result are in the result
 	for (i = 0; slmockdata->servers[i].name != NULL; i++) {
 		g_assert(find_server(array, &slmockdata->servers[i]));
 	}
+	// Check there is no more servers in the result than we expected
+	g_assert(i == g_variant_n_children(array));
 	g_variant_unref(array);
 
 	g_variant_unref(retval);