Avoiding further (LDAP) stack proliferation in Samba

Jeremy Allison jra at samba.org
Thu May 21 01:21:58 UTC 2020

On Thu, May 21, 2020 at 11:47:50AM +1200, Andrew Bartlett wrote:
> G'Day Sswen and Christian,
> As this is a more 'meta' question, I wanted to write to the broader
> mailing list in regard to: 
> https://gitlab.com/samba-team/samba/-/merge_requests/1351#note_346327256
> which is following on from Jermey's comment: https://gitlab.com/samba-team/samba/-/merge_requests/1258#note_320352109
> I'm really sorry this discussion has come up on what might, in other
> circumstances been a great demonstration of showing the broader design
> that started the tldap changes.
> Jermey asked earlier to see the broader designs and given the broader
> implications I think it is appropriate to have that raised on the list
> here.  
> Explaining our plans in public before we have code is not something we
> do well in Samba - we fear (and this mail shows that is a genuine fear)
> that others will jump in and suggest things.  Much easier to have the
> code finished and put any questions to bed with: well, this is written
> and works!
> However, I quite strongly feel that we should not further proliferate
> the new or substantial new use of tldap in Samba without:
>  - offsetting work to reduce, not increase the number of LDAP protocol
> stacks
> and
>  - substantial sharing of structures, ASN.1 parsing and other utility
> code
> My preference, as these are all sync or local callback based calls is
> that you implement this with LDB.  LDB is a mature, extensively used
> LDAP client library (not just the directory store for the AD DC).  
> The routines you would need are ldb_search() and ldb_request().  The
> timeout can be easily set on each request and I can assist with further
> guidance if need be.

Are there tevent_req async versions of ldb_search() and ldb_request()
(haven't looked, don't have the time right now, sorry) ? If not, is
is easy to add them ?

New code is moving to tevent_req and async as much as possible, so
to standardize on an internal ldap stack - which would be an amazingly
good thing to do IMHO it needs to have tevent_req and async functionality
I think.

More information about the samba-technical mailing list