[PATCH] winbindd: control number of winbindd's client connections

Uri Simchoni urisimchoni at gmail.com
Sat Jun 6 13:10:41 MDT 2015


LGTM.

I didn't particularly like putting that stuff in winbindd_util.c, but
saw the client list was there, and little or no module variables in
winbindd.c, so I figured there must be some policy to put global data
there, perhaps to make it non-global in the future (unit testing etc).
But now I realize that the reason for putting the client list in
winbindd_util.c was probably because it was accessed from more than
one module - something that cannot be said about the listening
sockets.

Thanks!
Uri.


On Fri, Jun 5, 2015 at 10:23 PM, Jeremy Allison <jra at samba.org> wrote:
> On Thu, Jun 04, 2015 at 10:54:44PM +0300, Uri Simchoni wrote:
>> Here's V2 with followiing changes:
>>
>> v2 1/6 - int->unsigned
>> v2 6/6 (new) - periodically (every 5 seconds) check for idle clients
>> and close them.
>>
>> Thanks,
>> Uri.
>
> Sorry, reviewing again I spotted a change I'd like
> to make. There's no need to expose struct winbindd_listen_state
> outside of source3/winbindd/winbindd.c, as all you really
> need for winbindd_is_accepting()/winbindd_pause_accepting()
> and winbindd_resume_accepting() are the struct tevent_fd
> pointers for the privileged and non-privileged listeners.
>
> Given that we can make these functions and behaviors
> static inside source3/winbindd/winbindd.c. This shouldn't
> be a behavior change, but a matter of taste (I don't
> like exposing across modules if I can help it, even
> though it looks like winbindd_is_accepting etc. belong
> in winbindd_util, as the deal with data only inside
> winbindd.c I don't think they do).
>
> Here is a modified patchset that does this. Can you
> confirm it's still good for you ?
>
> Cheers,
>
>         Jeremy.


More information about the samba-technical mailing list