create_conn_struct_tos() and connection re-use

Andrew Bartlett abartlet at
Fri Jun 22 22:13:56 UTC 2018

On Fri, 2018-06-22 at 15:06 -0700, Jeremy Allison wrote:
> On Sat, Jun 23, 2018 at 09:56:43AM +1200, Andrew Bartlett wrote:
> > Well, I can't hold a talloc_stackframe() across different calls, that's
> > the thing, we will need to return to python a connection object.  
> > 
> > The idea is to have a call to set up a connection, and then make file
> > operations in new function calls that pass in that connection.  How do
> > I do that safely?
> > 
> > (If I have to, I can do that, call back to python from the C with a
> > function pointer, but some info on how to do plan A would help). 
> > 
> > I'm asking now because I've just got the task in from the client and it
> > is on-topic and top of mind right now. 
> Well first do step zero, and find out if doing the connection
> setup teardown is really the main cost :-).


> 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.;a=blob;f=python/samba/provision/__in;h=f36f277742e6f2e2d87efba59c4573970f57f9a7;hb=fe9e62935c459e4cd

See set_gpos_acl(), set_dirs_acl(), setsysvolacl() and tell me you want
to re-implement in C ;-)

Andrew Bartlett

Andrew Bartlett             
Authentication Developer, Samba Team
Samba Developer, Catalyst IT

More information about the samba-technical mailing list