create_conn_struct_tos() and connection re-use

Jeremy Allison jra at
Fri Jun 22 22:32:59 UTC 2018

On Sat, Jun 23, 2018 at 10:13:56AM +1200, Andrew Bartlett wrote:
> > As you're doing a specific set of operations on a specific share,
> > seems to me it might just be easier to create a new python
> > wrapper call that creates a frame, gets the service and then
> > does the required calls from parameters passed into it.
> > 
> > Why call out to python at all, just do it all in C ?
> We set a different ACL on each file depending on the matching ACL in
> the LDAP entry for the matching group policy.
> ab0cefea1412614dd1969a8#l1550
> See set_gpos_acl(), set_dirs_acl(), setsysvolacl() and tell me you want
> to re-implement in C ;-)

Well this is just hard then with the current way
the python code is structured, sorry :-).

But using talloc_tos() in the python wrappers
doesn't make this any harder than it already
was using the original create_conn_struct()
code. You could try using talloc_move() to
move off the frame onto a long-term context
that you have to return to python somehow,
and then explicitly free the object when
you're done.

But the existing python code is structured such that
calling into the VFS fileserver calls creates/operated/frees
the connection object. The recent changes haven't changed

More information about the samba-technical mailing list