summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-02-23 07:46:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:47 -0500
commitbf772399bf38b16567b68e7fde102431e5a28135 (patch)
treea9a2684b054f08c93f509eede8500e4c8c93287d /source4/ldap_server
parent7f9d949bd34cbeaca8452ea08d39c0e4bbd3a669 (diff)
downloadsamba-bf772399bf38b16567b68e7fde102431e5a28135.tar.gz
r21511: this seems to be the nicer fix for the problem with
the windows 2000 LDAP client metze (This used to be commit d40465470fa09827ea529e1f2c80bca9efc152a8)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_bind.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index 3d5df58e210..c0d3e67ff28 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -185,14 +185,10 @@ static NTSTATUS ldapsrv_BindSASL(struct ldapsrv_call *call)
status = gensec_update(conn->gensec, reply,
input, &output);
- /* TODO: gensec should really handle the difference between NULL and length=0 better! */
- if (output.data) {
- resp->SASL.secblob = talloc(reply, DATA_BLOB);
- NT_STATUS_HAVE_NO_MEMORY(resp->SASL.secblob);
- *resp->SASL.secblob = output;
- } else {
- resp->SASL.secblob = NULL;
- }
+ /* Windows 2000 mmc doesn't like secblob == NULL and reports a decoding error */
+ resp->SASL.secblob = talloc(reply, DATA_BLOB);
+ NT_STATUS_HAVE_NO_MEMORY(resp->SASL.secblob);
+ *resp->SASL.secblob = output;
} else {
resp->SASL.secblob = NULL;
}