create_conn_struct_tos() and connection re-use
abartlet at samba.org
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.
See set_gpos_acl(), set_dirs_acl(), setsysvolacl() and tell me you want
to re-implement in C ;-)
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical