diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-06-11 14:35:35 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-14 15:52:29 -0400 |
commit | 95cc3f4be93d3cb5bb28bb3787f0aace4edb3124 (patch) | |
tree | fb607e88111eba1618dc93880fea2cb2fe8da6c3 /src/util | |
parent | 9a3ba9ca00e73adc3fb17ce8afa532076768023b (diff) | |
download | sssd-95cc3f4be93d3cb5bb28bb3787f0aace4edb3124.tar.gz sssd-95cc3f4be93d3cb5bb28bb3787f0aace4edb3124.tar.xz sssd-95cc3f4be93d3cb5bb28bb3787f0aace4edb3124.zip |
Use Kerberos context in KRB5_DEBUG
Passing Kerberos context to sss_krb5_get_error_message will allow us to
get better error messages.
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/sss_krb5.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/sss_krb5.h b/src/util/sss_krb5.h index 89ec00021..34fdc4950 100644 --- a/src/util/sss_krb5.h +++ b/src/util/sss_krb5.h @@ -46,6 +46,14 @@ const char * KRB5_CALLCONV sss_krb5_get_error_message (krb5_context, void KRB5_CALLCONV sss_krb5_free_error_message(krb5_context, const char *); +#define KRB5_DEBUG(level, errctx, krb5_error) do { \ + const char *__krb5_error_msg; \ + __krb5_error_msg = sss_krb5_get_error_message(errctx, krb5_error); \ + DEBUG(level, ("%d: [%d][%s]\n", __LINE__, krb5_error, __krb5_error_msg)); \ + sss_log(SSS_LOG_ERR, "%s", __krb5_error_msg); \ + sss_krb5_free_error_message(errctx, __krb5_error_msg); \ +} while(0) + krb5_error_code KRB5_CALLCONV sss_krb5_get_init_creds_opt_alloc( krb5_context context, krb5_get_init_creds_opt **opt); |