Constant time ObjectClass handling

Andrew Bartlett abartlet at samba.org
Fri Apr 6 15:21:21 MDT 2012


On Fri, 2012-04-06 at 14:46 +0200, Matthias Dieter Wallnöfer wrote:
> Andrew,
> 
> in my personal "master" branch you can find some other patches which 
> introduce the constant time structural object class detection and 
> perform the split-out of the object class sorter (this allows it to be 
> accessed from pydsdb.c - on the way of dbchecking this by the attribute 
> normalization code).
> Happy review!

Thanks.  I'll push these at some point over easter, except for:

commit 0dac7b21d97d504653375b8cfddec8a5f35bfc23
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Fri Apr 6 12:40:25 2012 +0200

    LDB/s4:dsdb - don't allocate objects on reallocable structures
    
    The "msg->elements" or "struct ldb_message_element" objects (array)
are subject
    to changes when adding/removing message elements. As far as I
understand
    "talloc" cannot handle this correctly.
    "msg" however remains always the same for a lifetime of a message.


Do you have any evidence that talloc doesn't do this properly?  It
certainly is meant to, so if this isn't working we should investigate
what is really going on.

One questions however: On the key patch:

commit 27078fac8555ef48b8da98650fe944180a177887
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Wed Apr 4 18:40:00 2012 +0200

    s4:dsdb - move "objectclass_sort()" out from the objectclass LDB
module into the schema code
    
    This allows it to be useful for the dbchecker utility in respect to
    object class problems.
    Fix up the API to only work with standardised LDB
"ldb_message_element"
    structures which do allow much easier interoperations. As a
consequence this
    leads to some changes in the objectclass module as well.

How did you solve the test failures?  When I tried to have it sort
before doing the get_last_structural_class() and
check_unrelated_objectclasses() I couldn't make it pass the ldap.py
python tests.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list