Constant time ObjectClass handling

Andrew Bartlett abartlet at
Sun Mar 25 18:54:42 MDT 2012

On Sun, 2012-03-25 at 23:42 +0200, Matthias Dieter Wallnöfer wrote:
> Andrew,
> in my personal "master" branch you can find the necessary changes ready 
> for review. Also the "dn" branch has been finished as well.


I really like your patch to do some constant-time objectclass handling.
I'm wondering if you could extend this work, so we always and only use
the constant time path?

I've tried, but your tests in are just too good!  As this is
your area, I wondered if you might be able to do a better job than I

The difficulty seems to be that we need to give the right error code
while sorting the list - previously we sorted it twice, once in
get_last_structural_objectclass, and then in objectclass_sort().

Otherwise, we might have to keep the current code, but it would be good
to at least switch the 'descriptor' uses across to the constant-time

Anyway, attached is my attempted patch, and a patch to to get
out a bit more error information, in case it helps. 


Andrew Bartlett

Andrew Bartlett                      
Authentication Developer, Samba Team 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-dsdb-Always-use-constant-time-search-for-get_last.patch
Type: text/x-patch
Size: 5963 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-patch
Size: 1666 bytes
Desc: not available
URL: <>

More information about the samba-technical mailing list