summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/clikrb5.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-09-11 23:09:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:39 -0500
commitc0bea2aeb36d4a6b7ed8240d3ed479b2c5c34a16 (patch)
tree5f55d18648ea95db2430aa8e3982997f151a61dd /source4/libcli/auth/clikrb5.c
parenta06b88863d165d20123ee19f9313249b870ed2be (diff)
downloadsamba-c0bea2aeb36d4a6b7ed8240d3ed479b2c5c34a16.tar.gz
samba-c0bea2aeb36d4a6b7ed8240d3ed479b2c5c34a16.tar.bz2
samba-c0bea2aeb36d4a6b7ed8240d3ed479b2c5c34a16.zip
r2286: Fixes towards krb5 logins into Samba's CIFS server.
These fixes aim particularly at allowing PAC-less logins, as I don't yet generate a PAC in the lorikeet-heimdal KDC. This is for the benifit of a Kerbeors-enabled domain join, which seems to be progressing quite well! Andrew Bartlett (This used to be commit f5a381094dd5bcbd795a134bc4b8b89901b5e3eb)
Diffstat (limited to 'source4/libcli/auth/clikrb5.c')
-rw-r--r--source4/libcli/auth/clikrb5.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index f6f8520b3c..78492d2352 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -150,18 +150,23 @@
}
#endif
- void get_auth_data_from_tkt(TALLOC_CTX *mem_ctx,
- DATA_BLOB *auth_data, krb5_ticket *tkt)
+ DATA_BLOB get_auth_data_from_tkt(TALLOC_CTX *mem_ctx,
+ krb5_ticket *tkt)
{
+ DATA_BLOB auth_data = data_blob(NULL, 0);
#if defined(HAVE_KRB5_TKT_ENC_PART2)
- if (tkt && tkt->enc_part2)
- *auth_data = data_blob(tkt->enc_part2->authorization_data[0]->contents,
+ if (tkt && tkt->enc_part2
+ && tkt->enc_part2->authorization_data
+ && tkt->enc_part2->authorization_data[0]
+ && tkt->enc_part2->authorization_data[0]->length)
+ auth_data = data_blob(tkt->enc_part2->authorization_data[0]->contents,
tkt->enc_part2->authorization_data[0]->length);
#else
if (tkt && tkt->ticket.authorization_data && tkt->ticket.authorization_data->len)
- *auth_data = data_blob(tkt->ticket.authorization_data->val->ad_data.data,
+ auth_data = data_blob(tkt->ticket.authorization_data->val->ad_data.data,
tkt->ticket.authorization_data->val->ad_data.length);
#endif
+ return auth_data;
}
krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt)