summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-01-28 00:33:21 +0000
committerJeremy Allison <jra@samba.org>2003-01-28 00:33:21 +0000
commit755e33ee3f25884096d3fa2ac4bd4cf64a794903 (patch)
treeab05d858bee67d931bf9f388c31b27406a9372c9 /source3/libsmb
parentf911f03a7db94635bf78d2c9b4748700af757bb5 (diff)
downloadsamba-755e33ee3f25884096d3fa2ac4bd4cf64a794903.tar.gz
samba-755e33ee3f25884096d3fa2ac4bd4cf64a794903.tar.bz2
samba-755e33ee3f25884096d3fa2ac4bd4cf64a794903.zip
Get smbd to link with Heimdal. Still missing some client progs...
Jeremy. (This used to be commit 85dda434763bbcea260c800599e4b6b73afcf174)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clikrb5.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 663f6a8454..24a24c66a6 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
*/