[PATCH] make nsswitch and libwbclient thread safe

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Oct 4 19:04:16 UTC 2018


On Thu, Oct 04, 2018 at 04:36:25PM +0200, Ralph Wuerthner via samba-technical wrote:
> Please see attached patchset to make nsswitch & libwbclient thread safe.
> 
> Currently nsswitch & libwbclient share a common, global context when
> communicating to winbindd. Threaded applications submitting requests in
> parallel via nsswitch & libwbclient to winbindd can fail because of the
> simplistic design of the communication protocol.
> 
> With the patch applied, access to the global libwbclient context is
> serialized by a mutex, similar to the mutex used in winbind_nss_linux.c.

Looks good to me. One question: Do you have a test to excercise the
failure and the succeeding behaviour?

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de



More information about the samba-technical mailing list