libsmbclient - Thread Saftey
jra at samba.org
Fri Oct 3 16:50:18 GMT 2008
On Fri, Oct 03, 2008 at 10:46:14AM -0400, Derrell Lipman wrote:
> On Fri, Oct 3, 2008 at 10:14 AM, Pane, Chris <cpane at vanteon.com> wrote:
> > I have been using libsmbclient to do some smb share browsing in an
> > application. I have read that it is currently not thread safe in samba-3.x.
> > Anyone know if there are plans for it to be made thread-safe in samba4?
> Hi Chris,
> I believe I've eliminated all non-thread-safe issues from within
> libsmbclient itself (although that will require a thorough inspection to
> confirm), but the core functions within samba that libsmbclient calls have
> not been thread-safe. Samba4 interfaces are, I think, inherently
> thread-safe. Therefore, although no work has begun yet on creating a samba4
> version of libsmbclient (and it's not yet scheduled), I don't believe
> there's any reason why a samba4 libsmbclient can't or won't be thread-safe.
The easiest thing to do at the moment is wrap the libsmbclient
functions in a mutex. I'm looking at making the underlying
functions thread safe, but that's a longer term job.
More information about the samba-technical