NULL vs. zero length DATA_BLOB's in LDAP

Andrew Bartlett abartlet at samba.org
Mon Feb 6 12:04:18 GMT 2006


On Mon, 2006-02-06 at 02:27 +0100, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> simo schrieb:
> > On Mon, 2006-02-06 at 01:32 +0100, Stefan (metze) Metzmacher wrote:
> >> Hi *,
> >>
> >> I have create a patch to correctly support OPTIONAL elements in the LDAP
> >> protocol parser, this really matters for some controls and for some SASL
> >> mechs...
> >>
> >> please review careful, abartlett please compare this with your changes
> >> in that area, I'm not really sure what comes outof gensec to seperate
> >> NULL vs. zero length...
> > 
> > Seem ok to me, if you pass tests then please commit.
> 
> I'll wait for abartlett.

The issue is, as you noted, that GENSEC does not yet possess this
distinction.  The only way I found to communicate the 'zero length' was
to have a DATA_BLOB with a valid, non-NULL data element, but zero
length.  (Traditional NULL/0 blobs being indicitive on NULL).

In short, the way to make this work right is to change gensec_update
everywhere.  

Andrew Bartlett
-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20060206/d5b06d79/attachment.bin


More information about the samba-technical mailing list