create_conn_struct_tos() and connection re-use

Jeremy Allison jra at samba.org
Fri Jun 22 22:35:04 UTC 2018


On Sat, Jun 23, 2018 at 12:15:56AM +0200, Stefan Metzmacher wrote:
> 
> There's currently no way to do that, sorry.
> I guess you need to create something better,
> In python you need some kind of 'connection'.

Yep that's the right level of abstraction
if you need to keep a VFS connection struct
alive between different python calls.

> Maybe you can take the lower level stuff.
> and use a given talloc pointer instead of talloc_tos().
> But it would be much better to just have some way
> of setting up this stuff and the master copy is
> make_connection_snum() that needs cleanup, so that
> it's possible to create a vfs stack not depending on
> SMB logic.
> 
> But this needs a lot of thinking to get right.
> The upcoming impersonation support will further complicate
> the event context, threadpool juggling.

Indeed. This code was never designed to be
called from python, it's for the needs of
smbd and the DFS code. It's a miracle it
works from python at all :-).

Jeremy.



More information about the samba-technical mailing list