summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-12 03:26:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:53 -0500
commit34b0a989ebdbd14c66665a493992d92452d53551 (patch)
treed3b5727f67395e7467ed54c6bda84ba97d9f580a /source4/libcli/auth
parent62c67d65056604e2a2969d9901978c0b5326978b (diff)
downloadsamba-34b0a989ebdbd14c66665a493992d92452d53551.tar.gz
samba-34b0a989ebdbd14c66665a493992d92452d53551.tar.bz2
samba-34b0a989ebdbd14c66665a493992d92452d53551.zip
r1748: don't segfault if there's no ticket
metze (This used to be commit b8985892964e84ca09d611540811d5a50a31232e)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/clikrb5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index c4bab57996..0e4ec1f438 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -154,11 +154,11 @@
DATA_BLOB *auth_data, krb5_ticket *tkt)
{
#if defined(HAVE_KRB5_TKT_ENC_PART2)
- if (tkt->enc_part2)
+ if (tkt && 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)
+ if (tkt && 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