summaryrefslogtreecommitdiff
path: root/source4/auth/kerberos/kerberos.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-06-04 11:17:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:34 -0500
commitd26f46f72c4149cbe404ef23a43a76d7605edc96 (patch)
treea8abad4aa2dcab5114469094d522153657a691d0 /source4/auth/kerberos/kerberos.h
parent8cd92242b9f247630e17d396014f6f671f577f4c (diff)
downloadsamba-d26f46f72c4149cbe404ef23a43a76d7605edc96.tar.gz
samba-d26f46f72c4149cbe404ef23a43a76d7605edc96.tar.bz2
samba-d26f46f72c4149cbe404ef23a43a76d7605edc96.zip
r7270: A big revamp to the way we handle kerberos errors in Samba4. We now
fill in the function pointers to handle the logging, and catch all the kerberos warnings. (Currently at level 3). To avoid a memory leak, this requries a new function: krb5_freelog(), which I've added to lorikeet/heimdal. This also required a revamp to how we handle the krb5_context, so as to make it easier to handle with talloc destructors. Andrew Bartlett (This used to be commit 63272794c41231b335b73e7ccf349282f295c4d2)
Diffstat (limited to 'source4/auth/kerberos/kerberos.h')
-rw-r--r--source4/auth/kerberos/kerberos.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index ec7df4c2f1..b65416e619 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -21,6 +21,12 @@
#if defined(HAVE_KRB5)
+struct smb_krb5_context {
+ krb5_context krb5_context;
+ krb5_log_facility *logf;
+};
+
+
/* not really ASN.1, but RFC 1964 */
#define TOK_ID_KRB_AP_REQ "\x01\x00"
#define TOK_ID_KRB_AP_REP "\x02\x00"
@@ -96,9 +102,11 @@ void kerberos_free_data_contents(krb5_context context, krb5_data *pdata);
krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry);
char *smb_get_krb5_error_message(krb5_context context, krb5_error_code code, TALLOC_CTX *mem_ctx);
NTSTATUS kinit_to_ccache(TALLOC_CTX *parent_ctx,
- struct cli_credentials *credentials,
- krb5_context context,
- krb5_ccache *ccache,
- const char **ccache_name);
+ struct cli_credentials *credentials,
+ struct smb_krb5_context *smb_krb5_context,
+ krb5_ccache *ccache,
+ const char **ccache_name);
+krb5_error_code smb_krb5_init_context(TALLOC_CTX *parent_ctx,
+ struct smb_krb5_context **smb_krb5_context);
#endif /* HAVE_KRB5 */