Winbindd limited by select

Michael Steffens michael.steffens at
Sat Feb 15 15:24:08 GMT 2003

Mike Sweet wrote:
> Sooo, my recommendations are as follows:
>     1. Provide a configure option (--with-maxfiles or similar)
>        to configure the upper limit you want to support in SAMBA.
>     2. Provide a smb.conf option to control the max number of
>        file descriptors.
>     3. Provide a definition on Solaris for FD_SETSIZE before
>        including <sys/select.h> so that the correct version of
>        select() is used.
>     4. On startup, query the current FD limit and set it to the
>        smaller of the "maxfiles" definition, the max value
>        reported by the kernel, and the max value in smb.conf.
>     5. Allocate the fd_set buffers [(maxfiles + 7) / 8 bytes]
>        and replace all use of FD_ZERO with memset/bzero with
>        the correct size.
>     6. Make sure all calls to FD_SET and FD_CLR are updated to
>        not use "&set", since "set" is now allocated.

Sounds good! And, for winbindd's client connections, shut down
idle connections when the limit is about to be exceeded?

Would need to also take FDs for TCP connections, TDBs, logs, etc
into account.


More information about the samba-technical mailing list