From 6b5c55b0f0155a2615683faccee9427c0aaf4baa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 25 Jul 2007 07:23:20 +0000 Subject: r24037: only setup sasl wrapping after a successful bind metze (This used to be commit 85d6cd3dfb5cbd9e899957265e352583ff608ed4) --- source3/libads/sasl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index a3636ec2be..d1cd9f4f0b 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -709,9 +709,11 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads) rc = ldap_sasl_bind_s(ads->ldap.ld, NULL, "GSSAPI", &cred, NULL, NULL, &scred); - status = ADS_ERROR(rc); - gss_release_buffer(&minor_status, &input_token); + status = ADS_ERROR(rc); + if (!ADS_ERR_OK(status)) { + goto failed; + } if (ads->ldap.wrap_type > ADS_SASLWRAP_TYPE_PLAIN) { gss_rc = gss_wrap_size_limit(&minor_status, context_handle, -- cgit