Commit b22249a3 authored by David King's avatar David King

Back out "authentication-method" setting change

This partially reverts commit 130d6a4a.
The schema changes to remove the (bogus) choices remain, but the code
changes were incorrect, as discussed in bug 683103.
parent 93cc216d
......@@ -68,9 +68,9 @@ set_inverted (const GValue *value,
return g_variant_new_boolean (!g_value_get_boolean (value));
}
/* Next, one that maps between the array-of-strings list of authentication
* mechanisms and a boolean that is TRUE only if "vnc" is in the list and FALSE
* otherwise.
/* Next, one that maps between the array-of-strings list of
* authentication mechanisms and a boolean that is FALSE if the 'none'
* and TRUE otherwise (ie: for 'vnc' in the list).
*/
static gboolean
get_authtype (GValue *value,
......@@ -81,11 +81,11 @@ get_authtype (GValue *value,
const gchar *type;
g_variant_iter_init (&iter, variant);
g_value_set_boolean (value, FALSE);
g_value_set_boolean (value, TRUE);
while (g_variant_iter_next (&iter, "s", &type))
if (strcmp (type, "vnc") == 0)
g_value_set_boolean (value, TRUE);
if (strcmp (type, "none") == 0)
g_value_set_boolean (value, FALSE);
return TRUE;
}
......@@ -95,12 +95,14 @@ set_authtype (const GValue *value,
const GVariantType *type,
gpointer user_data)
{
const gchar *vnc_auth = "vnc";
const gchar *authtype;
if (g_value_get_boolean (value))
return g_variant_new_strv (&vnc_auth, 1);
authtype = "vnc";
else
return g_variant_new_strv (NULL, 0);
authtype = "none";
return g_variant_new_strv (&authtype, 1);
}
......
......@@ -82,7 +82,7 @@
specified by the vnc-password key) before connecting and "none"
which allows any remote user to connect.
</description>
<default>[]</default>
<default>['none']</default>
</key>
<key name='vnc-password' type='s'>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment