nss_winbind is not thread safe, any suggestions to fix this?

Jeremy Allison jra at samba.org
Fri Sep 28 15:01:22 GMT 2007


On Fri, Sep 28, 2007 at 11:49:47AM +0800, boyang wrote:
> 
> hi, Allison:
>      1. Could you explain the reason of renaming keep_response? I cannot
> see any difference except it becomes more clear after the renaming.  In
> my opinion, keep_response works properly without renaming them.

No, it doesn't. It's actually a bug. A 'static int x' has file
scope in C. All those variables were actually redefinitions of
the same thing.

>      2. I can understand why you add pthread_mutex_lock/unlock
> respectively in setpwent/setgrent and endpwent/endgrent.
> But when I write the patch,  I take setpwent-getpwent-endpwent as one
> object, and use pthread_mutex_lock in setXXent function,
> pthread_mutex_unlock in endXXent function.  I think I have thought too
> much about it :-).
>      You are right. Respective pthread_mutex_lock/unlock operates normally.

Thanks :-).

Ok, thanks for the review. I'll commit.

Cheers,

	Jeremy.


More information about the samba-technical mailing list