summaryrefslogtreecommitdiff
path: root/source3/libsmb/async_smb.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-10async_smb.c: convert cli->timeout properlyRusty Russell1-1/+2
I have a test failure on my 32-bit Ubuntu system, in that samba3.smbtorture_s3.plain(s3dc).LOCK9 immediately times out (rather than waiting 5 seconds for the child). Debugging revealed this code: timeout is in ms and is set to > 1000 in various places. The code dates from 2002, and other perturbations didn't reveal why it breaks now, but fix it anyway. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User: Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date: Tue May 10 12:09:07 CEST 2011 on sn-devel-104
2011-05-06s3-libsmb: move protos to libsmb/proto.hGünther Deschner1-0/+1
Guenther
2011-05-05More const fixes for compiler warnings from the waf build.Jeremy Allison1-1/+1
2011-04-29s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner1-0/+2
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-03-30s3-libsmb: put namequery headers to nmblib.hGünther Deschner1-0/+1
We might find a better name for it and merge other namequery related things as well here... Guenther
2011-03-16s3-libsmb: move smb encryption structs into own header.Günther Deschner1-0/+1
Guenther
2010-12-22s3: Add async cli_session_requestVolker Lendecke1-0/+127
This does not do the redirects, but I think that might be obsolete anyway
2010-11-18s3: Make winbind recover from a signing errorVolker Lendecke1-0/+2
When winbind sees a signing error on the smb connection to a DC (for whatever reason, our bug, network glitch, etc) it should recover properly. The "old" code in clientgen.c just closed the socket in this case. This is the right thing to do, this connection is spoiled anyway. The new, async code did not do this so far, which led to the code in winbindd_cm.c not detect that we need to reconnect.
2010-09-20s3-build: only include async headers where needed.Günther Deschner1-0/+2
Guenther
2010-08-19s3-libsmbclient Convert dos error codes to NTstatus in async libsmbclient.Jim McDonough1-7/+1
DOS error codes were being lost with the conversion to async libsmbclient. If we're passing around NTSTATUS internally, let's just convert it when we get it. DOS ACCESS_DENIED on nautilus was not prompting for other credentials, because it was not being mapped.
2010-03-30If the timeout has been set to zero, don't register an end time.Jeremy Allison1-3/+5
The caller doesn't want a timeout. Jeremy.
2010-02-28s3: Fix the CHAIN1 torture testVolker Lendecke1-1/+9
I've tried to solve this just within cli_smb_recv(), but I could not find a way to sanely determine when we are receiving the last entry in the chain just from looking at the blob. This solves it in an a bit more brutal way...
2010-02-22s3: Explicitly handle inbuf in cli_smb_oplock_break_waiter_doneVolker Lendecke1-2/+3
2010-02-22s3: Add a talloc_move for the inbuf to cli_smb_recvVolker Lendecke1-3/+8
2010-02-21s3: Avoid calling cli_alloc_mid twice in cli_smb_req_iov_sendVolker Lendecke1-1/+2
I hate macros....
2010-01-26s3:async_smb: remove unused variableBjörn Jacke1-2/+0
2010-01-03s3: NT_STATUS_MORE_PROCESSING_REQUIRED is a valid sesssetup return valueVolker Lendecke1-9/+23
2009-12-22s3: Restore correct timeouts for SMB requestsVolker Lendecke1-0/+5
2009-12-22s3: Remove a pointless else branchVolker Lendecke1-5/+3
2009-12-22s3: Move smb_splice_chain to smbd/process.c, its only userVolker Lendecke1-174/+0
2009-05-24Add "err_on_readability" to writev_sendVolker Lendecke1-2/+2
A socket where the other side has closed only becomes readable. To catch errors early when sitting in a pure writev, we need to also test for readability.
2009-05-18Fix broken pipe handlingVolker Lendecke1-2/+2
Metze is right: If we have *any* error at the socket level, we just can not continue. Also, apply some defensive programming: With this async stuff someone else might already have closed the socket.
2009-05-19s3: tevent_req_poll() loops forever when pipe is brokenBo Yang1-0/+8
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-13s3:libsmb: move read_smb_send/recv() static in async_smb.cStefan Metzmacher1-0/+87
metze
2009-05-13s3:libsmb: let cli_smb_chain_send() also return NTSTATUSStefan Metzmacher1-9/+12
metze
2009-05-13s3:libsmb: return NT_STATUS_CONNECTION_INVALID if the fd is -1Bo Yang1-5/+7
This way we can destinguish between requests which failed because the connection broke after they were triggered and the requests which are started on an already broken connection. This also moves the check to cli_smb_req_iov_send() where it really belongs. metze
2009-05-13s3: return proper error code in cli_smb_req_sendBo Yang1-22/+28
Signed-off-by: Bo Yang <boyang@samba.org>
2009-05-12Clean up assignments to iov_base, ensure it's always cast to void *. This ↵Jeremy Allison1-6/+6
should quieten some warnings with picky compilers on the buildfarm. Jeremy.
2009-04-29s3: fix crash in winbinddBo Yang1-0/+4
2009-04-06Add async oplock waiterVolker Lendecke1-1/+101
2009-04-06Never hand out 0xffff as a midVolker Lendecke1-1/+1
This is used for oplock replies
2009-04-06Remove async_req based async libsmb infrastructureVolker Lendecke1-869/+0
2009-04-06Add new async libsmb infrastructureVolker Lendecke1-0/+765
I know this is just yet another iteration, but I like this one much better than the one that exists right now :-) It will do trans and echo requests without a _recv helper and without unnecessary memcpy().
2009-03-23s3:libsmb: use new simplified smb_signing code for the client sideStefan Metzmacher1-15/+28
We store the seqnum/mid mapping in the cli_request structure for async requests and in the cli_state structure for sync calls. We skip the signing check for oplock requests while waiting for async requests coming in. metze
2009-03-20Fix crash in async_smb.cBo Yang1-3/+6
2009-02-01Split up async_req into a generic and a NTSTATUS specific partVolker Lendecke1-2/+2
2009-01-31Make is_andx_req non-staticVolker Lendecke1-26/+0
2009-01-28Fix a valgrind error when the socket diesVolker Lendecke1-4/+9
Don't reference anything that might have been deleted in the async_req_error call.
2009-01-03struct async_req doesn't really need to carry an event_contextVolker Lendecke1-1/+1
2008-12-19Fix setting smb_len for huge write&x callsVolker Lendecke1-1/+14
2008-12-19Add the cli_wct_ofs routine to calculate the offset for write&xVolker Lendecke1-0/+31
2008-12-19Add a doxygen comment line I forgot to mergeVolker Lendecke1-0/+1
2008-12-19Convert cli_request->outbuf to uint8_tVolker Lendecke1-13/+15
2008-12-19For large smbwrite&x, we need more than 64k bccVolker Lendecke1-4/+4
2008-12-19Add some commentsVolker Lendecke1-0/+22
If it takes more than 10 seconds to understand the code you've written yourself less than a year ago, it's time for comments or refactoring. I couldn't find a way to refactor that cleanly, so add comments :-)
2008-12-19Fix the padding calculation in smb_splice_chain for "bytes_padding!=0"Volker Lendecke1-1/+1
2008-12-19Pass "bytes_alignment" up through cli_request_sendVolker Lendecke1-2/+5
This parameter makes smb_spice_chain add padding before the bytes field
2008-12-19Prefer network writes over readsVolker Lendecke1-32/+33
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-08Add a "bytes_padding" parameter to smb_splice_chainVolker Lendecke1-12/+28
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-08Factor out smb_splice_chain(), to be used by chain_reply() in smbdVolker Lendecke1-46/+98