Remove talloc from libwbclient

Volker Lendecke Volker.Lendecke at SerNet.DE
Sat Feb 6 16:31:33 MST 2010

On Sat, Feb 06, 2010 at 02:02:15PM -0500, simo wrote:
> A change in the API is usually a bad thing, the whole point of
> libwbclient was to build an API/ABI that wouldn't change so that people
> could use it. So, personally, I'd go with number 1, it may be a bit ugly
> but it won't break the API.
> Of course none of this is necessary if we make system talloc an explicit
> dependency and stop statically linking in talloc (this is the real
> issue, and it is an issue in any public library we want to build), then
> the only thing you need to make sure of is that talloc is used in a
> thread-safe way, which shouldn't be too difficult within libwbclient.

The problem is that you can't use talloc in a thread-safe
way from within a library where you don't control access to
the NULL context at all.

A different way to do this would be to have a thread-safe
version of talloc_init() that we could use as a shared
talloc parent in libwbclient, where we could control and
mutex the access to it.


More information about the samba-technical mailing list