summaryrefslogtreecommitdiff
path: root/source4/libcli/composite
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r4957: the fetchfile _recv() function was neglecting to steal the data andAndrew Tridgell1-1/+11
free the connection context. This left a whole lot of state hanging around and didn't give the memory to the caller properly (This used to be commit 3e13e1d526563d91cb2342ae68455e54eb49a9bd)
2007-10-10r4951: some of the code dealing with libcli was getting too complex trying toAndrew Tridgell1-6/+3
handle the inverted memory hierarchy that a normal session establishment gave. The inverted hierarchy came from that fact that you first establish a socket, then a transport, then a session and finally a tree. That leads to the socket being at the top of the memory hierarchy and the tree at the bottom, which makes no sense from the users point of view, as they want to be able to free the tree and have everything disappear. The core problem was that the libcli interface didn't distinguish between establishing a primary context and a secondary context. If you establish a 2nd session on a transport then you want the transport to be referenced by the session, whereas if you establish a primary session then you want the transport to be a child of the session. To fix this I have added "parent_ctx" and "primary" arguments to the libcli intialisation functions. This makes using the library much easier, and gives us a memory hierarchy that makes much more sense. I was prompted to do this by a bug in the cifs backend, which was caused by the socket not being properly torn down on a disconnect due to the inverted memory hierarchy. (This used to be commit 5e8fd5f70178992e249805c2e1ddafaf6840739b)
2007-10-10r4950: removed some excessive debugging messagesAndrew Tridgell1-8/+0
(This used to be commit 4a351901aa49090700d89274559d6dda76f06b7d)
2007-10-10r4949: First version of a fetchfile composite function which connects to a ↵Volker Lendecke2-0/+206
server and loads a file. Needs a smb url parsing wrapper. Volker (This used to be commit fa435bf7c878d4a5beb6afb2ed6e2990abc11e82)
2007-10-10r4938: allow the caller to supply an existing event_context if they want toAndrew Tridgell1-4/+5
in smb_composite_connect_send(). This makes doing parallel calls much easier. (This used to be commit 442308970c123b9fb25615673049e1c1c234a0b9)
2007-10-10r4937: simplify the connect code in the same wayAndrew Tridgell1-15/+12
(This used to be commit 347dfa47249d55c61e1e7c82d10444a71aca8a85)
2007-10-10r4936: moved to a convention where the completion function is only called inAndrew Tridgell2-24/+18
one place. This makes the code more robust, and simpler (it would have prevented the error that volker found). (This used to be commit 420b53091ee784d7891fb62d48e2f5a225b4dbf8)
2007-10-10r4935: fixed a bug where "c->status = xxx_handler(x);" could write to c afterAndrew Tridgell3-15/+22
it is freed. The problem is that the handler might complete the request, and called the c->async.fn() async handler. That handler might free the request handle. (This used to be commit c4faceadc74e0849f6197ccbec9952f6c94f6176)
2007-10-10r4924: continue the effort to simplify and generalise the compositeAndrew Tridgell4-19/+18
interface. This patch removes the "stage" variable, which is really better suited to the backend state structures (This used to be commit 39da684ea8bc72d7a4a12c00eaad56b4f32890a9)
2007-10-10r4911: make sure we fill in the transport called name on port 445 as wellAndrew Tridgell1-6/+9
(thanks to abartlet for spotting this bug) (This used to be commit 8b653f12f21e7a8eee8e60cefb193505c2df7f8f)
2007-10-10r4891: - added a generic resolve_name() async interface in libcli/resolve/,Andrew Tridgell1-6/+41
which will eventually try all resolution methods setup in smb.conf - only resolution backend at the moment is bcast, which does a parallel broadcast to all configured network interfaces, and takes the first reply that comes in (this nicely demonstrates how to do parallel requests using the async APIs) - converted all the existing code to use the new resolve_name() api - removed all the old nmb code (yay!) (This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3)
2007-10-10r4795: stronget type checking in composite connect functionAndrew Tridgell1-2/+4
(This used to be commit e16f67c931ba93011d52fdf14312d12a9b09c49a)
2007-10-10r4791: used the new talloc type safety macros to make the "void *private"Andrew Tridgell4-23/+23
pointers in the composite code type safe. This is a bit of an experiement, I'd be interested in comments on whether we should use this more widely. (This used to be commit 0e1da827b380998355f75f4ef4f424802059c278)
2007-10-10r4783: got rid of another void* in the composite code. This brings us down toAndrew Tridgell5-114/+88
the minimal level I think (one private pointer for the composite function, and one private pointer for the caller) (This used to be commit 0240bf928163e32e7c69be88fe3ed4987dd18778)
2007-10-10r4782: volker quite rightly pointed out that there is too much of aAndrew Tridgell5-130/+131
proliferation of void* in the composite code. This removes two of the void* pointers from the main composite structure. (This used to be commit 5a89a5ed0fa022fb380bf72065904633270f34aa)
2007-10-10r4778: I forgot to set the session key for the spnego path. Fixed.Andrew Tridgell1-0/+1
(This used to be commit 870af4e2f2055013424d9dbe2df2c51faa810eec)
2007-10-10r4777: added a smb_composite_sesssetup() async composite function. ThisAndrew Tridgell3-65/+443
encapsulates all the different session setup methods, including the multi-pass spnego code. I have hooked this into all the places that previously used the RAW_SESSSETUP_GENERIC method, and have removed the old RAW_SESSSETUP_GENERIC code from clisession.c and clitree.c. A nice side effect is that these two modules are now very simple again, back to being "raw" session setup handling, which was what was originally intended. I have also used this to replace the session setup code in the smb_composite_connect() code, and used that to build a very simple replacement for smbcli_tree_full_connection(). As a result, smbclient, smbtorture and all our other SMB connection code now goes via these composite async functions. That should give them a good workout! (This used to be commit 080d0518bc7d6fd4bc3ef783e7d4d2e3275d0799)
2007-10-10r4769: added a smb_composite_connect() function that provides a simple asyncAndrew Tridgell2-0/+437
interface to a complete SMB connection setup. Internally it does: - socket connection - session request (if needed) - negprot - session setup - tcon This is the first example of a composite function that builds on other composite components (the socket connection is a composite function, which is used as a building block for this function). I think this will be quite common in composite functions in the future, building up ever more complex composite functions from smaller building blocks, while hiding the details from the caller. There are two things missing from this now. The first is async name resolution routines (wins, bcast, DNS etc), and the second is that this code currently only does a NT1 style session setup. I'll work on adding spnego and old style session setup support next. (This used to be commit 6bc9e17f5c5236f662c7c8f308d03e6d97379b23)
2007-10-10r4754: tidied up the composite function infrastructure to make it easier toAndrew Tridgell4-44/+67
have composite functions that are not made up of functions that operate on smbcli_request structures. (This used to be commit 4f6055b4fb7e287a29544ff1ca4e22f698efc478)
2007-10-10r4710: added a smb_composite_savefile() function, and expanded the test ↵Andrew Tridgell4-11/+346
suite a little (This used to be commit ef4dbc443dbdebc4160209ed3f23cbb97109c414)
2007-10-10r4700: first attempt at a composite async function, smb_composite_loadfile(),Andrew Tridgell2-0/+361
which combineds ntcreatex, readx and close into a single call that behaves just like a normal libcli async call. (This used to be commit 516f68fb054f0717f0429e031aa820776ecc6597)