1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

26 Commits

Author SHA1 Message Date
Volker Lendecke
4abdd3981e Pass "bytes_alignment" up through cli_request_send
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19 14:53:29 +01:00
Volker Lendecke
2fe7d5936a Prefer network writes over reads
If we really want to keep the pipe busy, we need to write everything we have as
early as possible, giving the kernel the chance to get rid of the buffers
quickly :-)
2008-12-19 13:46:52 +01:00
Volker Lendecke
ed25c6c287 Add a "bytes_padding" parameter to smb_splice_chain
For example open&x and write&x needs the bytes to be aligned relative to the
SMB header. In particular for write&x we should not have to move stuff around.
2008-12-08 22:09:33 +01:00
Volker Lendecke
f0bb53dd0f Factor out smb_splice_chain(), to be used by chain_reply() in smbd 2008-12-08 22:09:33 +01:00
Tim Prouty
16bbfc2262 Fixed "argument differ in signedness" warning on linux 2008-10-14 17:31:07 -07:00
Jeremy Allison
decd04d946 Ensure we handle signals correctly during the async calls.
Jeremy.
2008-10-09 15:40:00 -07:00
Volker Lendecke
eeac8d4fbe Remove a cast -- thanks metze 2008-09-17 17:45:17 +02:00
Volker Lendecke
ffbc38abe1 Factor out validate_smb_crypto
(This used to be commit 37fcc9dc46)
2008-09-12 23:09:17 +02:00
Volker Lendecke
ced409b5f7 Fix "make test" -- gna...
(This used to be commit c1d3ae80b5)
2008-09-12 22:29:56 +02:00
Volker Lendecke
d892b1c886 remove a pointless empty line
(This used to be commit fba250ece4)
2008-09-12 21:42:34 +02:00
Volker Lendecke
f8f1679bc4 Add a paranoia check on incoming PDUs
(This used to be commit 8b81b85200)
2008-09-12 21:42:34 +02:00
Volker Lendecke
2a93452994 Move setting the mid field in req->outbuf from _cork to _uncork
The async trans calls need this, as for secondary trans calls they have to
modify the MID from what cli_request_chain() gave us.
(This used to be commit c85de4b7b5)
2008-09-09 17:37:34 +02:00
Volker Lendecke
6ba8c105c5 Add utility function cli_in_chain()
This gives a hint whether a function is called from within the middle of a
chain. In particular the trans calls don't really like this.
(This used to be commit 4252b32db5)
2008-09-09 17:37:34 +02:00
Volker Lendecke
60255c3b2e Protect against a closed socket
(This used to be commit d6cb5fdafb)
2008-09-05 12:33:48 +02:00
Volker Lendecke
f912ac962a Do proper error handling if the socket is closed
(This used to be commit e5a27773f9)
2008-09-05 12:33:48 +02:00
Volker Lendecke
f294f51bf0 Remove cli_request_get()
req->private_data==NULL at this point is definitely a bug.
(This used to be commit ce3dc9f616)
2008-08-28 18:22:49 +02:00
Volker Lendecke
bb0fc9cfce Add cli_request->recv_helper
Necessary for requests with multiple replies
(This used to be commit cb2e338eb3)
2008-08-28 18:15:59 +02:00
Volker Lendecke
b054f14111 Activate code to enable chained requests
Add the CHAIN1 torture test
(This used to be commit 82992d74a9)
2008-08-28 18:15:59 +02:00
Volker Lendecke
65dcdf9c32 This adds the code to allow chained requests in libsmb/
This is not compiled yet, but it makes the patches much easier to read if it is
add in bulk.
(This used to be commit b4c539ba04)
2008-08-28 18:15:58 +02:00
Volker Lendecke
77d1b29e25 Move "struct cli_request" from client.h to async_smb.h
Also add some comments
(This used to be commit 2ecc311f78)
2008-08-28 17:53:37 +02:00
Volker Lendecke
128524930d Add cli_pull_reply
Along the lines of cli_request_send this abstracts away the smb-level buffer
handling when parsing replies we got from the server.
(This used to be commit 253134d3aa)
2008-08-28 17:53:37 +02:00
Volker Lendecke
2650207d4a Remove cli->event_ctx, pass it explicitly
Storing the event_context as permanent state in struct cli_state creates more
complex code than necessary IMO.
(This used to be commit debb37f703)
2008-08-28 17:53:37 +02:00
Volker Lendecke
58aa97c0d9 Refactoring: Add the routine cli_request_send()
cli_request_send() is supposed to bundle all generic SMB-header handling. This
makes cli_request_new static to async_smb.c.
(This used to be commit 7e73dd4e76)
2008-08-28 17:53:36 +02:00
Jim McDonough
b48ba00dc6 Prevent NT_STATUS 0xF1000000 errors from appearing when
dos errors are used and there is no error.  It should
be mapped directly to NT_STATUS_OK.  smbclient to older
servers didn't work.
(This used to be commit 78f009b7ef)
2008-08-14 11:22:46 +02:00
Volker Lendecke
464f74df2f Move inbuf handling to before the PDU handling
In an error case, correctly discard the offending PDU
(This used to be commit 0aa195b5d6)
2008-03-08 22:02:33 +01:00
Volker Lendecke
1ea0a5d0cd Add infrastructure to support async SMB requests
(This used to be commit e215330135)
2008-03-06 13:28:23 +01:00