diff options
author | Andrew Bartlett <abartlet@samba.org> | 2004-07-09 11:46:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:54 -0500 |
commit | bdb0b60861dd2c352dd30ff1c1822c57ce304d0f (patch) | |
tree | ce5cdd969a82addb5953b23ffa2c709778ebfbd8 /source4/libcli/auth/clikrb5.c | |
parent | 2c87cb390d9c46bb1259c4fae95f4a44be97297b (diff) | |
download | samba-bdb0b60861dd2c352dd30ff1c1822c57ce304d0f.tar.gz samba-bdb0b60861dd2c352dd30ff1c1822c57ce304d0f.tar.bz2 samba-bdb0b60861dd2c352dd30ff1c1822c57ce304d0f.zip |
r1418: Merge Samba 3.0's recent kerberos changes into Samba4. None of this
is used yet.
Andrew Bartlett
(This used to be commit 7596f311c9a18314716f64476030ce3dfcdd98bb)
Diffstat (limited to 'source4/libcli/auth/clikrb5.c')
-rw-r--r-- | source4/libcli/auth/clikrb5.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c index 6e19d4dc18..b3aa9008ca 100644 --- a/source4/libcli/auth/clikrb5.c +++ b/source4/libcli/auth/clikrb5.c @@ -124,13 +124,13 @@ #endif #if defined(HAVE_KRB5_GET_PERMITTED_ENCTYPES) -krb5_error_code get_kerberos_allowed_etypes(krb5_context context, + krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes) { return krb5_get_permitted_enctypes(context, enctypes); } #elif defined(HAVE_KRB5_GET_DEFAULT_IN_TKT_ETYPES) -krb5_error_code get_kerberos_allowed_etypes(krb5_context context, + krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes) { return krb5_get_default_in_tkt_etypes(context, enctypes); @@ -434,9 +434,12 @@ int cli_krb5_get_ticket(const char *principal, time_t time_offset, failed: if ( context ) { -#if 0 /* JERRY -- disabled since it causes heimdal 0.6.1rc3 to die - SuSE 9.1 Pro */ +/* Removed by jra. They really need to fix their kerberos so we don't leak memory. + JERRY -- disabled since it causes heimdal 0.6.1rc3 to die + SuSE 9.1 Pro +*/ if (ccdef) +#if 0 /* redisabled by gd :) at least until any official heimdal version has it fixed. */ krb5_cc_close(context, ccdef); #endif if (auth_context) @@ -486,6 +489,17 @@ failed: } #endif + krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry) +{ +#if defined(HAVE_KRB5_KT_FREE_ENTRY) + return krb5_kt_free_entry(context, kt_entry); +#elif defined(HAVE_KRB5_FREE_KEYTAB_ENTRY_CONTENTS) + return krb5_free_keytab_entry_contents(context, kt_entry); +#else +#error UNKNOWN_KT_FREE_FUNCTION +#endif +} + #else /* HAVE_KRB5 */ /* this saves a few linking headaches */ int cli_krb5_get_ticket(const char *principal, time_t time_offset, |