Constant time ObjectClass handling

Andrew Bartlett abartlet at samba.org
Tue Apr 10 15:08:23 MDT 2012


On Tue, 2012-04-10 at 15:40 +0200, Matthias Dieter Wallnöfer wrote:
> Hi Andrew,
> 
> Andrew Bartlett schrieb:
> > 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.
> Okay, I have not been aware of this circumstance. So I wrote this patch 
> just in case talloc could not handle this - I was simply not sure about,
> let us drop it.

Thanks,

> > 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.
> I am a bit puzzled. But the patches should now be passing ldap.py - as 
> far as I have tested. Or are you still getting failures?

I first worked on a very similar patch, but wasn't able to make it pass
the tests.  That's all. 

I'll get these into the tree after I do the alpha19 release.

Andrew Bartlett

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



More information about the samba-technical mailing list