summaryrefslogtreecommitdiff
path: root/source4/libcli
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r4944: every event_add_*() caller was having to call talloc_steal() to takeAndrew Tridgell4-11/+6
control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure. (This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50)
2007-10-10r4943: Smplified the events handling code a lot. The first source ofAndrew Tridgell4-33/+7
complexity was that events didn't automatically cleanup themselves. This was because the events code was written before we had talloc destructors, so you needed to call event_remove_XX() to clean the event out of the event lists from every piece of code that used events. I have now added automatic event destructors, which in turn allowed me to simplify a lot of the calling code. The 2nd source of complexity was caused by the ref_count, which was needed to cope with event handlers destroying events while handling them, which meant the linked lists became invalid, so the ref_count ws used to mark events for later destruction. The new system is much simpler. I now have a ev->destruction_count, which is incremented in all event destructors. The event dispatch code checks for changes to this and handles it. (This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10r4938: allow the caller to supply an existing event_context if they want toAndrew Tridgell3-7/+14
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-10r4927: parse the NBT session request in the smb server. This gets rid of thatAndrew Tridgell1-1/+12
annoying "not parsing session request" message on each SMB connection (This used to be commit b06b8dd2f4f4fea750b05fd29d68372828159f16)
2007-10-10r4924: continue the effort to simplify and generalise the compositeAndrew Tridgell5-22/+22
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-10r4922: fixed an infinite loop in the name resolve code when handling a methodAndrew Tridgell1-3/+1
in smb.conf that isn't implemented in the library (This used to be commit dd5b43ed37b37feec4708f8f13033b42eb6a838c)
2007-10-10r4919: if a caller doesn't provide an event context to the resolver library,Andrew Tridgell1-1/+6
then create one. This fixes a crash in the RAW-NEGNOWAIT test for 'host' resolution. (This used to be commit 3268d523cc381b9b3077f794bb53daf0865d139c)
2007-10-10r4916: added "host" name resolution using fork() per gethostbyname()Andrew Tridgell3-17/+270
comments welcome, but please think about the alternatives first :-) (This used to be commit 3d40b479907226be349137117e0d2bd718efa1a8)
2007-10-10r4915: free temp context _before_ the async callback, as the async callback ↵Andrew Tridgell1-1/+1
might destroy our top level context leaving the tmp context freed (so a double free) (This used to be commit b20c0561b8ec3ec7010f846be7a39165783e15c2)
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-10r4909: fixed name_trn_id generation (thanks to metze for spotting the bug!)Andrew Tridgell1-1/+3
(This used to be commit 9d2d16ce5fd57cad01ddaf1112beed916cc2088d)
2007-10-10r4901: a bit more info on nbt packets under high debug levelAndrew Tridgell1-2/+5
(This used to be commit 9a34af29388d8ca837c670d054a76d1f75098cbd)
2007-10-10r4898: - removed the unused wins_srv_*() codeAndrew Tridgell6-106/+359
- expanded the generic async name resolver to try multiple methods - added wins resolutions to the list of methods tried - fixed up the random trn id generation to use the good random generator (This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a)
2007-10-10r4896: make sure the event context doesn't go away while waiting for event ↵Andrew Tridgell1-1/+1
completion (This used to be commit c1063919c069b0b36dd3da6dc6853236629804e3)
2007-10-10r4894: namecache.c is not used any more eitherAndrew Tridgell1-247/+0
(This used to be commit 24927e69d824a1f3c01b2f63876afdfc6064d5ac)
2007-10-10r4893: Move to using secrets.ldb for the Kerberos verify, instead ofAndrew Bartlett1-12/+33
secrets.tdb from Samba3. Andrew Bartlett (This used to be commit 21bfda2a0d1c8373f8800269ed9b982e1b9a19e5)
2007-10-10r4891: - added a generic resolve_name() async interface in libcli/resolve/,Andrew Tridgell16-2730/+414
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-10r4890: Try to cope with mechanism mismatch in the client speaks first versionAndrew Bartlett1-7/+98
of the SPNEGO state-machine. (Such as on LDAP and HTTP) Andrew Bartlett (This used to be commit c1cae6b3b1efe109a09e449ed2e09983431eac7e)
2007-10-10r4886: fixed two places where we process the send side of a socket after theAndrew Tridgell1-0/+1
recv side in the same event. That's a bad idea, as the first callback could decide to destroy the socket. (This used to be commit bf74ea34fc0e3c31e220c8f5a9217c95f3ca1d52)
2007-10-10r4885: added a new NBT client library. Features include:Andrew Tridgell5-1/+1036
- structures defined using IDL in nbt.idl - build around our events structure, and talloc - fully async - supports all NBT packet fields as per rfc1002 - easy interfaces for name query and status For the moment there are just a couple of test functions in namequery.c, test_name_query() and test_name_status(). These will be removed when we hook the new library into libcli/ fully The new library will also be a fairly good basis for a nbt server. Although it can't be a server as-is, I wrote it with the needs of a server in mind (for example, extremely scalable idtree based packet handling) (This used to be commit ae7e625bfa4b4a3ee32c64566064b6a4c84ee4b9)
2007-10-10r4811: now that the event context is at the socket level, the event cleanupAndrew Tridgell2-1/+13
should be there too (This used to be commit 058ae5527e3daeb50eeea9e0ecee858c84e7e17d)
2007-10-10r4810: fixed anonymous connections with smbclient. Thanks to jbm for ↵Andrew Tridgell1-2/+6
pointing this out. (This used to be commit 7da0af98a0e0bc743d3c64be30b37cbc45e00737)
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 Tridgell5-25/+25
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 Tridgell9-576/+473
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 Tridgell5-4/+476
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-10r4767: handle the different NBT session request refusals, and map them toAndrew Tridgell1-10/+41
reasonable NT_STATUS values (This used to be commit b193a9cb0c851a4ec55ad9956a815be93eea35e4)
2007-10-10r4765: simplify the async socket code to always go via the event handlerAndrew Tridgell1-18/+9
rather than short-circuiting in the unlikely event the OS returns an immediate success on a non-blocking connect (This used to be commit db4380717041485e216f965103f9e803518b45c3)
2007-10-10r4758: - added async support to the session request codeAndrew Tridgell5-45/+105
- added async support to the negprot client code - removed two unused parameters from smbcli_full_connection() code - converted smbclient to use smbcli_full_connection() rather than reinventing everything itself (This used to be commit 71cbe2873473e039b4511511302cb63f1c50bce8)
2007-10-10r4757: added the ability of the clisocket level of libcli to handle asyncAndrew Tridgell5-91/+221
socket connections. This was complicated by a few factors: - it meant moving the event context from clitransport to clisocket, so lots of structures changed - we need to asynchronously handle connection to lists of port numbers, not just one port number. The code internally tries each port in the list in turn, without ever blocking - the man page on how connect() is supposed to work asynchronously doesn't work in practice (now why doesn't this surprise me?). The getsockopt() for SOL_ERROR is supposed to retrieve the error, but in fact the next (unrelated) connect() call on the same socket also gets an error, though not the right error. To work around this I need to tear down the whole socket between each attempted port. I hate posix. Note that clisocket.c still does a blocking name resolution call in smbcli_sock_connect_byname(). That will be fixed when we add the async NBT resolution code. Also note that I arranged things so that every SMB connection is now async internally, so using plain smbclient or smbtorture tests all the async features of this new code. (This used to be commit 468f8ebbfdbdf37c757fdc4863626aa9946a8870)
2007-10-10r4755: the recent change in the definition of lp_passwordserver() breaks thisAndrew Tridgell2-204/+0
old code, so I'm just removing it, as it needs replacing anyway (This used to be commit cae7748d675e35bfb89b81349624258bc76fac1a)
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-10r4726: - use the name tcon and tid instead of conn and cnumStefan Metzmacher3-5/+5
- make use of talloc destructors metze (This used to be commit 8308da6ce4a95f8c10e22949ef00e9e64f2dbb85)
2007-10-10r4710: added a smb_composite_savefile() function, and expanded the test ↵Andrew Tridgell5-12/+350
suite a little (This used to be commit ef4dbc443dbdebc4160209ed3f23cbb97109c414)
2007-10-10r4701: remove debugsStefan Metzmacher1-2/+0
metze (This used to be commit 9db0d19413beb4a0a0b48f4223600ff8dff33728)
2007-10-10r4700: first attempt at a composite async function, smb_composite_loadfile(),Andrew Tridgell4-1/+366
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)
2007-10-10r4692: Make the client SPNEGO code bail out in a couple more cases.Andrew Bartlett1-1/+4
Andrew Bartlett (This used to be commit a062ac122c402fb2cf31eb8e76f4077b1f33b8eb)
2007-10-10r4682: A LDB-based secrets implementation in Samba4.Andrew Bartlett1-21/+22
This uses LDB (a local secrets.ldb and the global samdb) to fill out the secrets from an LSA perspective. Some small changes to come, but the bulk of the work is now done. A re-provision is required after this change. Andrew Bartlett (This used to be commit ded33033521a6a1c7ea80758c5c5aeeebb182a51)
2007-10-10r4658: (grr, commited wrong file last time).Andrew Bartlett1-1/+1
We really should have a seperate structure for this (the ARCFOUR sbox), but for now, get the declaration right. Andrew Bartlett (This used to be commit 2e16f3a8d31954fdfe4a8832637fcd9191ecab96)
2007-10-10r4650: - make more use of bitmap and enum'sStefan Metzmacher2-2/+4
- move some structs out of misc.idl metze (This used to be commit b6543a6e3057b5588ec50a2ebf6c7c932209efe6)
2007-10-10r4641: Push a few more details into the schannel ldb, and into theAndrew Bartlett2-2/+9
credentials struct it maintains. Clearly much of this will be replaced with some system to pass and store the session_info, as that is the 'right way' to handle this. Andrew Bartlett (This used to be commit c6fcb33a887fbf0c0b42c3bc331df942a985128c)
2007-10-10r4635: Fix NTLMSSP to return NT_STATUS_OK when it has constructed the authAndrew Bartlett2-32/+34
token in the client (the final token in the negotiation). Consequential fixes in the SPNEGO code, which now uses the out.length as the indicator of 'I need to send something to the other side'. Merge the NTLM and SPNEGO DCE-RPC authentication routines in the client. Fix the RPC-MULTIBIND test consequent to this merge. Andrew Bartlett (This used to be commit 43e3516fc03008e97ebb4ad1a0cde464303f43c6)
2007-10-10r4620: - add interface functions to the auth subsystem so that callers ↵Stefan Metzmacher3-152/+108
doesn't need to use function pointers anymore - make the module init much easier - a lot of cleanups don't try to read the diff in auth/ better read the new files it passes test_echo.sh and test_rpc.sh abartlet: please fix spelling fixes metze (This used to be commit 3c0d16b8236451f2cfd38fc3db8ae2906106d847)
2007-10-10r4618: - tidied up the alter_context client code a bitAndrew Tridgell1-0/+1
- there is no alter_nak or alter_ack packet, its all done in an alter_response - auto-allocated the contex_ids - tried to fix up the dcom code to work again with alter_context. Jelmer, please take a look :) (This used to be commit dd1c54add8884376601f2f8a56c01bfb8add030c)