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);