diff options
Diffstat (limited to 'source4/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_bind.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index aba35e0b56..0cf2a8b7e6 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -74,7 +74,6 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call) gensec_want_feature(call->conn->gensec, GENSEC_FEATURE_SIGN); gensec_want_feature(call->conn->gensec, GENSEC_FEATURE_SEAL); - status = gensec_start_mech_by_sasl_name(call->conn->gensec, req->creds.SASL.mechanism); if (!NT_STATUS_IS_OK(status)) { @@ -104,7 +103,10 @@ reply: } else if (NT_STATUS_IS_OK(status)) { result = LDAP_SUCCESS; errstr = NULL; - call->conn->enable_wrap = True; + if (gensec_have_feature(call->conn->gensec, GENSEC_FEATURE_SEAL) || + gensec_have_feature(call->conn->gensec, GENSEC_FEATURE_SIGN)) { + call->conn->enable_wrap = True; + } } else { result = 49; errstr = talloc_asprintf(reply, "SASL:[%s]: %s", req->creds.SASL.mechanism, nt_errstr(status)); |