diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-30 11:54:41 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-01-31 09:37:53 -0500 |
commit | 85d8b2567730b236578a1aaeb0139c38dda23304 (patch) | |
tree | 8bc737287348e31c3c2d606da3ed4b7ecbda6229 /src/providers | |
parent | 3bfcc41589b0b7c09f8ebba1c835f9944d85ceb9 (diff) | |
download | sssd-85d8b2567730b236578a1aaeb0139c38dda23304.tar.gz sssd-85d8b2567730b236578a1aaeb0139c38dda23304.tar.bz2 sssd-85d8b2567730b236578a1aaeb0139c38dda23304.zip |
KRB5: Add syslog messages for Kerberos failures
https://fedorahosted.org/sssd/ticket/1137
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/krb5/krb5_child.c | 1 | ||||
-rw-r--r-- | src/providers/ldap/ldap_child.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index c83179b4..cc185260 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -103,6 +103,7 @@ static const char *__krb5_error_msg; #define KRB5_DEBUG(level, krb5_error) do { \ __krb5_error_msg = sss_krb5_get_error_message(krb5_error_ctx, 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(krb5_error_ctx, __krb5_error_msg); \ } while(0) diff --git a/src/providers/ldap/ldap_child.c b/src/providers/ldap/ldap_child.c index 05aadde9..66ceb14e 100644 --- a/src/providers/ldap/ldap_child.c +++ b/src/providers/ldap/ldap_child.c @@ -36,6 +36,13 @@ static krb5_context krb5_error_ctx; +static const char *__krb5_error_msg; +#define KRB5_SYSLOG(krb5_error) do { \ + __krb5_error_msg = sss_krb5_get_error_message(krb5_error_ctx, krb5_error); \ + sss_log(SSS_LOG_ERR, "%s", __krb5_error_msg); \ + sss_krb5_free_error_message(krb5_error_ctx, __krb5_error_msg); \ +} while(0) + struct input_buffer { const char *realm_str; const char *princ_str; @@ -308,6 +315,7 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx, *expire_time_out = my_creds.times.endtime - kdc_time_offset; done: + if (krberr != 0) KRB5_SYSLOG(krberr); if (keytab) krb5_kt_close(context, keytab); if (context) krb5_free_context(context); return krberr; |