[PATCH] [Samba4] Map special DNs to CN=Special container
mkhl at samba.org
Thu Jun 15 13:26:02 GMT 2006
On 6/15/06, simo <idra at samba.org> wrote:
> On Thu, 2006-06-15 at 14:35 +0200, Martin Kühl wrote:
> I consider this as a sort of exercise.
That's what it's supposed to be.
> >From the DN POV it seem ok, but you fail to translate attribute names
> that start with the @ which is an invalid symbol for ldap (even for
> attribute names IIRC) and was chosen on purpose.
Oops, you're right.
> > - Did I step into any obvious pitfalls (talloc related ones, say)?
> I do not understand why you used talloc_steal here (unspecial_search()):
> ac->search_req->op.search.base = talloc_steal(ac->search_req, dn);
> you should pass ac->search_req to un_remap_special_dn() as the context
> so that the dn is allocated from start on the right talloc context.
> Same for all other places.
ac->search_req isn't allocated yet when I call un_remap_special_dn();
I did that so I could bail out from easy to spot errors before
allocating large chunks, like the async handle and context.
Hm, now that I said that, it sounds a lot like premature optimization.
> > - I "this" (use callbacks for handling search results, anything else
> > in async_wait) how asynchronism is supposed to work? If I were to
> > split a request in two, would I run the first part directly and the
> > second one from the following async_wait?
> See the password_hash module to see how that works.
Will do, thanks.
More information about the samba-technical