summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-07-25 07:23:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:58 -0500
commit6b5c55b0f0155a2615683faccee9427c0aaf4baa (patch)
treee7d79e90b6173079125c8e1124ebde54b3a10c52 /source3
parent76f0168f4f89a53375da8847aae98ec0de5e1e16 (diff)
downloadsamba-6b5c55b0f0155a2615683faccee9427c0aaf4baa.tar.gz
samba-6b5c55b0f0155a2615683faccee9427c0aaf4baa.tar.bz2
samba-6b5c55b0f0155a2615683faccee9427c0aaf4baa.zip
r24037: only setup sasl wrapping after a successful bind
metze (This used to be commit 85d6cd3dfb5cbd9e899957265e352583ff608ed4)
Diffstat (limited to 'source3')
-rw-r--r--source3/libads/sasl.c6
1 files changed, 4 insertions, 2 deletions
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,