[gnome-online-accounts] kerberos: Mark EnsureCredentials failures as authorization errors
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] kerberos: Mark EnsureCredentials failures as authorization errors
- Date: Fri, 29 May 2015 14:04:08 +0000 (UTC)
commit 64fa5cbb4eac31e6bca2ee53895020b9291bd2dd
Author: Debarshi Ray <debarshir gnome org>
Date: Thu May 28 16:20:57 2015 +0200
kerberos: Mark EnsureCredentials failures as authorization errors
Otherwise GoaAccount:attention-needed won't be set and the UI won't
reflect reality.
Fall out from 7ba73645e6068935f331969e14d56a39544ebca5
https://bugzilla.gnome.org/show_bug.cgi?id=693578
src/goabackend/goakerberosprovider.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goakerberosprovider.c b/src/goabackend/goakerberosprovider.c
index 9a4d9dd..f7ca21b 100644
--- a/src/goabackend/goakerberosprovider.c
+++ b/src/goabackend/goakerberosprovider.c
@@ -1391,18 +1391,29 @@ ensure_credentials_sync (GoaProvider *provider,
if (identity == NULL || !goa_identity_service_identity_get_is_signed_in (identity))
{
+ GError *lookup_error;
gboolean ticket_synced;
+ lookup_error = NULL;
+
g_mutex_unlock (&identity_manager_mutex);
ticket_synced = get_ticket_sync (GOA_KERBEROS_PROVIDER (provider),
object,
FALSE /* Don't allow interaction */,
cancellable,
- error);
+ &lookup_error);
g_mutex_lock (&identity_manager_mutex);
if (!ticket_synced)
- goto out;
+ {
+ translate_error (&lookup_error);
+ g_set_error_literal (error,
+ GOA_ERROR,
+ GOA_ERROR_NOT_AUTHORIZED,
+ lookup_error->message);
+ g_error_free (lookup_error);
+ goto out;
+ }
if (identity == NULL)
identity = get_identity_from_object_manager (GOA_KERBEROS_PROVIDER (provider),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]