mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 19:22:11 +01:00
GDBus: If an authentication method fail, don't give up, just try the next one
This problem was reported in bug 647602. https://bugzilla.gnome.org/show_bug.cgi?id=647602 Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
parent
69c4e81d0a
commit
fc80ec9d0c
@ -663,7 +663,8 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
|
|||||||
if (line == NULL)
|
if (line == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
debug_print ("CLIENT: WaitingForReject, read '%s'", line);
|
debug_print ("CLIENT: WaitingForReject, read '%s'", line);
|
||||||
foobar:
|
|
||||||
|
choose_mechanism:
|
||||||
if (!g_str_has_prefix (line, "REJECTED "))
|
if (!g_str_has_prefix (line, "REJECTED "))
|
||||||
{
|
{
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
@ -739,7 +740,7 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
|
|||||||
}
|
}
|
||||||
else if (g_str_has_prefix (line, "REJECTED "))
|
else if (g_str_has_prefix (line, "REJECTED "))
|
||||||
{
|
{
|
||||||
goto foobar;
|
goto choose_mechanism;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -841,6 +842,13 @@ _g_dbus_auth_run_client (GDBusAuth *auth,
|
|||||||
}
|
}
|
||||||
state = CLIENT_STATE_WAITING_FOR_OK;
|
state = CLIENT_STATE_WAITING_FOR_OK;
|
||||||
}
|
}
|
||||||
|
else if (g_str_has_prefix (line, "REJECTED "))
|
||||||
|
{
|
||||||
|
/* could be the chosen authentication method just doesn't work. Try
|
||||||
|
* another one...
|
||||||
|
*/
|
||||||
|
goto choose_mechanism;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user