From 755e33ee3f25884096d3fa2ac4bd4cf64a794903 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 28 Jan 2003 00:33:21 +0000 Subject: Get smbd to link with Heimdal. Still missing some client progs... Jeremy. (This used to be commit 85dda434763bbcea260c800599e4b6b73afcf174) --- source3/libsmb/clikrb5.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source3/libsmb/clikrb5.c') diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index 663f6a84549..24a24c66a6f 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -118,6 +118,28 @@ } #endif + void get_auth_data_from_tkt(DATA_BLOB *auth_data, krb5_ticket *tkt) +{ +#if defined(HAVE_KRB5_TKT_ENC_PART2) + if (tkt->enc_part2) + *auth_data = data_blob(tkt->enc_part2->authorization_data[0]->contents, + tkt->enc_part2->authorization_data[0]->length); +#else + if (tkt->ticket.authorization_data && tkt->ticket.authorization_data->len) + *auth_data = data_blob(tkt->ticket.authorization_data->val->ad_data.data, + tkt->ticket.authorization_data->val->ad_data.length); +#endif +} + + krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt) +{ +#if defined(HAVE_KRB5_TKT_ENC_PART2) + return tkt->enc_part2->client; +#else + return tkt->client; +#endif +} + /* we can't use krb5_mk_req because w2k wants the service to be in a particular format */ -- cgit