summaryrefslogtreecommitdiff
path: root/source4/libcli/ldap
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-01 00:19:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:07:53 -0500
commit740ee4a8977512c03800ef88603cf65fd044443b (patch)
tree4178f6c62ed1bae48e51247c88a6f5c2cde15fab /source4/libcli/ldap
parent9a6671cf9529fd7817c5ef266da3d3bea46a88c0 (diff)
downloadsamba-740ee4a8977512c03800ef88603cf65fd044443b.tar.gz
samba-740ee4a8977512c03800ef88603cf65fd044443b.tar.bz2
samba-740ee4a8977512c03800ef88603cf65fd044443b.zip
r4460: Add a new GENSEC module: gensec_gssapi
(disabled by default, set parametric option: gensec:gssapi=yes to enable). This module backs directly onto GSSAPI, and allows us to sign and seal GSSAPI/Krb5 connections in particular. This avoids me reinventing the entire GSSAPI wheel. Currently a lot of things are left as default - we will soon start specifiying OIDs as well as passwords (it uses the keytab only at the moment). Tested with our LDAP-* torture tests against Win2k3. My hope is to use this module to access the new SPNEGO implementation in Heimdal, to avoid having to standards-verify our own. Andrew Bartlett (This used to be commit 14b650c85db14a9bf97e24682b2643b63c51ff35)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r--source4/libcli/ldap/ldap_client.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 77356cbe70..9ca9e4b5c4 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -459,9 +459,13 @@ int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const cha
break;
}
- status = gensec_update(conn->gensec, mem_ctx,
- response->r.BindResponse.SASL.secblob,
- &output);
+ if (!NT_STATUS_IS_OK(status)) {
+ status = gensec_update(conn->gensec, mem_ctx,
+ response->r.BindResponse.SASL.secblob,
+ &output);
+ } else {
+ output.length = 0;
+ }
talloc_free(response);
}