summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-10-31 19:20:33 +0000
committerJim McDonough <jmcd@samba.org>2002-10-31 19:20:33 +0000
commit69a2042dc607da52eca85f93e115339b0a859b12 (patch)
tree5828f917d16890dcdb6f04b9cbe97404266c82c6
parent0e2eedb268ea48de490adfe4112a9347fdf41fec (diff)
downloadsamba-69a2042dc607da52eca85f93e115339b0a859b12.tar.gz
samba-69a2042dc607da52eca85f93e115339b0a859b12.tar.bz2
samba-69a2042dc607da52eca85f93e115339b0a859b12.zip
Re-enable use of existing kerberos tickets.
(This used to be commit 6ec5dce69834e72e458a8acff7d1790cbdd46d67)
-rw-r--r--source3/libads/sasl.c8
1 files changed, 6 insertions, 2 deletions
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