svn commit: samba r21511 - in branches/SAMBA_4_0/source:
ldap_server libcli/ldap
metze at samba.org
metze at samba.org
Fri Feb 23 07:46:51 GMT 2007
Author: metze
Date: 2007-02-23 07:46:51 +0000 (Fri, 23 Feb 2007)
New Revision: 21511
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21511
Log:
this seems to be the nicer fix for the problem with
the windows 2000 LDAP client
metze
Modified:
branches/SAMBA_4_0/source/ldap_server/ldap_bind.c
branches/SAMBA_4_0/source/libcli/ldap/ldap.c
Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_bind.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2007-02-23 07:32:13 UTC (rev 21510)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2007-02-23 07:46:51 UTC (rev 21511)
@@ -185,14 +185,10 @@
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;
}
Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap.c
===================================================================
--- branches/SAMBA_4_0/source/libcli/ldap/ldap.c 2007-02-23 07:32:13 UTC (rev 21510)
+++ branches/SAMBA_4_0/source/libcli/ldap/ldap.c 2007-02-23 07:46:51 UTC (rev 21511)
@@ -237,10 +237,6 @@
ldap_encode_response(&data, &r->response);
if (r->SASL.secblob) {
asn1_write_ContextSimple(&data, 7, r->SASL.secblob);
- } else {
- /* ugly but the windows 2000 mmc deturns decoding error without this */
- DATA_BLOB zero = data_blob(NULL, 0);
- asn1_write_ContextSimple(&data, 7, &zero);
}
asn1_pop_tag(&data);
break;
More information about the samba-cvs
mailing list