From 69a2042dc607da52eca85f93e115339b0a859b12 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Thu, 31 Oct 2002 19:20:33 +0000 Subject: Re-enable use of existing kerberos tickets. (This used to be commit 6ec5dce69834e72e458a8acff7d1790cbdd46d67) --- source3/libads/sasl.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/libads') diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index aa7d99a5f7..dacf8f7da8 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -192,8 +192,12 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads) #ifdef HAVE_KRB5 if (!(ads->auth.flags & ADS_AUTH_DISABLE_KERBEROS) && - got_kerberos_mechanism && ads_kinit_password(ads) == 0) { - return ads_sasl_spnego_krb5_bind(ads, principal); + got_kerberos_mechanism) { + status = ads_sasl_spnego_krb5_bind(ads, principal); + if (ADS_ERR_OK(status)) + return status; + if (ads_kinit_password(ads) == 0) + return ads_sasl_spnego_krb5_bind(ads, principal); } #endif -- cgit