summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-11-10 03:07:19 +0000
committerJeremy Allison <jra@samba.org>2002-11-10 03:07:19 +0000
commitf48a8615d67c2ccba3a0b65877402b24493da58e (patch)
tree53129023d6a5cfffbd49102766ec1255cd1632ce /source3/libads
parent978214b18e4df64b215a8ecd339c46e1c358fb7c (diff)
downloadsamba-f48a8615d67c2ccba3a0b65877402b24493da58e.tar.gz
samba-f48a8615d67c2ccba3a0b65877402b24493da58e.tar.bz2
samba-f48a8615d67c2ccba3a0b65877402b24493da58e.zip
After the lord mayors parade......
Janitor for tridge :-). Jeremy. (This used to be commit 76cdfbd5107fff0c38f5fc339f1c27b33fec3a91)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/sasl.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index aa7d99a5f7..16ad397d0e 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -192,8 +192,15 @@ 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) {
+ status = ads_sasl_spnego_krb5_bind(ads, principal);
+ }
+ if (ADS_ERR_OK(status))
+ return status;
}
#endif