diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-07-15 20:27:43 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-07-15 20:27:43 +1000 |
commit | d904b71879cf980f602bfd400cf98396616c13e1 (patch) | |
tree | faffbb30f594b04903813f5267bd0c7d01c5d575 /source4/libcli/ldap/ldap_bind.c | |
parent | cc44b10c240e22a7db83c641a9015dad3ec2e0de (diff) | |
parent | 63d91e9ab0ecc1e80edff27ae09b249c68453106 (diff) | |
download | samba-d904b71879cf980f602bfd400cf98396616c13e1.tar.gz samba-d904b71879cf980f602bfd400cf98396616c13e1.tar.bz2 samba-d904b71879cf980f602bfd400cf98396616c13e1.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 7fb8179f214bbba95eb35d221cb9892b55afe121)
Diffstat (limited to 'source4/libcli/ldap/ldap_bind.c')
-rw-r--r-- | source4/libcli/ldap/ldap_bind.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c index e1569e7296..65673116be 100644 --- a/source4/libcli/ldap/ldap_bind.c +++ b/source4/libcli/ldap/ldap_bind.c @@ -234,7 +234,7 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, * Windows seem not to like double encryption */ old_gensec_features = cli_credentials_get_gensec_features(creds); if (tls_enabled(conn->sock)) { - cli_credentials_set_gensec_features(creds, 0); + cli_credentials_set_gensec_features(creds, old_gensec_features & ~(GENSEC_FEATURE_SIGN|GENSEC_FEATURE_SEAL)); } /* this call also sets the gensec_want_features */ @@ -245,7 +245,8 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, goto failed; } - /* reset the original gensec_features */ + /* reset the original gensec_features (on the credentials + * context, so we don't tatoo it ) */ cli_credentials_set_gensec_features(creds, old_gensec_features); if (conn->host) { @@ -393,8 +394,6 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, &sasl_socket); if (!NT_STATUS_IS_OK(status)) goto failed; - talloc_steal(conn->sock, sasl_socket); - talloc_unlink(conn, conn->sock); conn->sock = sasl_socket; packet_set_socket(conn->packet, conn->sock); |