libsmblclient and closing connections?

Richard Sharpe rsharpe at richardsharpe.com
Thu Feb 17 20:06:42 GMT 2005


On Thu, 17 Feb 2005, Michael Thomas wrote:

> Hi,
>
>   Is there a way to close a connection that was created using
> smbc_init/smbc_open?
>
>   I have written an apache module that authenticates the user against
> the samba permissions of the dir/file being accessed. Everything works
> great, except that the samba connections to dot get closed when the http
> connection dies. This becomes a major problem after a while as all kinds
> of zombie connections are lying around. I see there are some cli_* type
> calls that might do the trick, but I was hoping to avoid having to learn
> any samba internals etc..

OK, there is a function smbc_remove_unused_server, but you need to find a
server pointer to do that.

I guess what is really needed is an smbc_shutdown (and
smbc_shutdown_context) that will close down all connections and clean
things up.

While this function will be relatively easy to create, I am not sure I
have the time right now to do that :-)

Regards
-----
Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com


More information about the samba-technical mailing list