diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-11-05 11:24:10 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:48 -0500 |
commit | 75ec65597cd9b0008876bbb5967f822f65985d0c (patch) | |
tree | 16917cb70b22a2222fb5ffb7f8c6b7442b6a4f81 /source4/libcli/ldap | |
parent | df9af348761989a8a1f257a29e9209aed4bfb373 (diff) | |
download | samba-75ec65597cd9b0008876bbb5967f822f65985d0c.tar.gz samba-75ec65597cd9b0008876bbb5967f822f65985d0c.tar.bz2 samba-75ec65597cd9b0008876bbb5967f822f65985d0c.zip |
r11523: Working towards having Samba3 join Samba4, this allows the SASL
credentials to be NULL, where the client is requesting a CIFS style
server-first negTokenInit.
Andrew Bartlett
(This used to be commit eba652ecc89766304fdad14463072dc311693701)
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r-- | source4/libcli/ldap/ldap.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/libcli/ldap/ldap.c b/source4/libcli/ldap/ldap.c index 043faabf2f..7d1758a8fa 100644 --- a/source4/libcli/ldap/ldap.c +++ b/source4/libcli/ldap/ldap.c @@ -933,9 +933,13 @@ BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg) asn1_start_tag(data, ASN1_CONTEXT(3)); r->mechanism = LDAP_AUTH_MECH_SASL; asn1_read_OctetString_talloc(msg, data, &r->creds.SASL.mechanism); - asn1_read_OctetString(data, &r->creds.SASL.secblob); - if (r->creds.SASL.secblob.data) { - talloc_steal(msg, r->creds.SASL.secblob.data); + if (asn1_peek_tag(data, ASN1_OCTET_STRING)) { /* optional */ + asn1_read_OctetString(data, &r->creds.SASL.secblob); + if (r->creds.SASL.secblob.data) { + talloc_steal(msg, r->creds.SASL.secblob.data); + } + } else { + r->creds.SASL.secblob = data_blob(NULL, 0); } asn1_end_tag(data); } |