[gnome-online-accounts/wip/rishi/kerberos-identity-renew-errors-remove-redundancy-and-null: 2/2] kerberos-identity: Clarify the error when talking to the KDC failed




commit 77594888fa7a854676ec8a014a5575ffe0b90771
Author: Debarshi Ray <debarshir gnome org>
Date:   Thu Oct 13 19:02:59 2022 +0200

    kerberos-identity: Clarify the error when talking to the KDC failed
    
    When krb5_get_renewed_creds fails to talk to the Kerberos Key
    Distribution Centre (or KDC) because of network problems,
    krb5_get_error_message translates the krb5_error_code as:
      Resource temporarily unavailable
    
    This ends up in the debug logs as:
      GoaKerberosIdentityManager: could not renew identity: Could not get
        new credentials to renew identity FOO BAR ORG: Resource temporarily
        unavailable
      GoaIdentityService: could not renew identity: Could not get new
        credentials to renew identity FOO BAR ORG: Resource temporarily
        unavailable
    
    It's not immediately clear that the 'resource' that's 'temporarily
    unavailable' is actually the KDC, which would make it easier to
    understand that there is a network problem.
    
    Therefore, mention KDC in the error string from krb5_get_renewed_creds
    and make it match the documentation [1] of that function because it
    makes the code self-documenting.
    
    [1] https://web.mit.edu/kerberos/krb5-devel/doc/appdev/refs/api/krb5_get_renewed_creds.html
    
    https://gitlab.gnome.org/GNOME/gnome-online-accounts/-/issues/160

 src/goaidentity/goakerberosidentity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index 3d2fe25c..57ab616f 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -1454,7 +1454,7 @@ goa_kerberos_identity_renew (GoaKerberosIdentity *self, GError **error)
                                                  error,
                                                  GOA_IDENTITY_ERROR_RENEWING,
                                                  error_code,
-                                                 _("Could not get new credentials to renew identity %s: "),
+                                                 _("Could not get renewed credentials from the KDC for 
identity %s: "),
                                                  name);
       goto free_principal;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]