[PATCH] Fix ldb_comparison_binary for blobs of differing lengths
abartlet at samba.org
Tue Jan 26 18:59:14 UTC 2016
On Tue, 2016-01-26 at 10:53 -0800, Jeremy Allison wrote:
> On Wed, Jan 27, 2016 at 07:44:41AM +1300, Andrew Bartlett wrote:
> > On Tue, 2016-01-26 at 09:42 -0800, Jeremy Allison wrote:
> > >
> > > What is the current sort algorithm when applied to binary
> > > comparison ? Could any real applications (not the nbt tests
> > > only) depend on this ?
> > Length before content. Shorter length sorts first.
> > The issue is that if you put positive integers into LDB, and don't
> > declare them as an INTEGER in @ATTRIBUTES then the < and >
> > operators
> > still 'just work'.
> > I think real applications could innocently depend on it, as this is
> > metze code in the WINS replication server that broke.
> (*) You just nailed the coffin shut there I'm afraid :-).
> > I hate the idea of baking this behaviour in forever-more, but
> > changing
> > the output of a valid search against valid data seems equally un
> > -desirable.
> Yeah, but see (*) above :-(. If real apps depend on it we
> have to keep it that way. You said you'd already got patches
> that implement this, right ?
I'll tidy that up when I get to the office and get that to the list.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical