summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_server.c
AgeCommit message (Collapse)AuthorFilesLines
2011-05-31s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett1-1/+1
This has been a wrapper around server_event_context() for some time now, and removing this from dummmysmbd.c assists with library dependencies. Andrew Bartlett
2011-05-12s3: Slightly simplify smbd_smb2_request_next_vectorVolker Lendecke1-3/+5
Metze, Jeremy, please check!
2011-05-05More simple const fixes.Jeremy Allison1-4/+4
2011-05-05s3: Fix dup_smb2_vec3Volker Lendecke1-1/+1
Metze, Jeremy, please check! Thanks, Volker Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Thu May 5 13:39:40 CEST 2011 on sn-devel-104
2011-04-29s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner1-0/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Fri Apr 29 14:00:30 CEST 2011 on sn-devel-104
2011-04-14s3: only include smb profiling where needed.Günther Deschner1-0/+1
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Apr 14 01:31:39 CEST 2011 on sn-devel-104
2011-03-30s3: include smbd/smbd.h where needed.Günther Deschner1-0/+1
Guenther
2011-01-27Change "security=share" to downgrade to SMB1 from SMB2, rather than trying ↵Jeremy Allison1-8/+0
to fake it.
2011-01-17s3: Fix a C++ warningVolker Lendecke1-1/+1
2010-12-21My algorithm for determining whan an incoming sequence number can be allowed ↵Jeremy Allison1-6/+7
is incorrect. (I based it on the text in MS-SMB2, silly me :-). Fix it so incoming sequence numbers can range over the entire allowable bitmap range. This fixes a repeatable disconnect against Win7. Jeremy.
2010-12-20CREATE in a compound CREATE/NOTIFY sequence was being passed through ↵Ken Harris1-17/+17
set_operation_credits() twice (ultimately perhaps because of bug 7331 involving this compound sequence and the need to be ready for any incoming CANCEL of the NOTIFY). This had the server thinking it had granted more credit than it actually had, which lead to zero-credits being granted in interim NOTIFY responses. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Dec 20 20:59:55 CET 2010 on sn-devel-104
2010-12-15Implement "use sendfile = yes" for SMB2. (cherry picked from commit ↵Jeremy Allison1-0/+9
95cb7adcd03a1abbd0af395b6c96dd8e0eebd3d1) Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Dec 15 02:24:08 CET 2010 on sn-devel-104
2010-12-14Change crediting so that the credits are returned on the interim async response.Jeremy Allison1-4/+7
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Dec 14 01:09:05 CET 2010 on sn-devel-104
2010-12-13We need to start off with smb2.credits_granted == 0. That wayJeremy Allison1-2/+3
when processing the faked up SMB2 NegProt from the SMB1 packet we always allocate one credit on reply. Jeremy.
2010-12-13Remove extra unused credit arg. to smbd_smb2_request_setup_out()Jeremy Allison1-3/+3
2010-12-10Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to ↵Jeremy Allison1-23/+132
128 credits. Jeremy.
2010-08-30s3: Fix some uninitialized variable warningsVolker Lendecke1-1/+1
2010-08-27Fix bug #7653 - When SMB2 is on, Windows 7 clients can not connect as guest ↵Jeremy Allison1-0/+8
to a share. Fix "security = share" with SMB2 by mapping internally to "security = user" and "map to guest = Bad User". Jeremy.
2010-08-16s3: Remove smbd_server_fd from smbd_initialize_smb2Volker Lendecke1-2/+2
2010-07-09s3: Cleanup of the initial SMB2 counters patch.Ira Cooper1-89/+191
This reorganizes smbd_smb2_request_dispatch to have a central exit point, and use the normal profiling macros. Signed-off-by: Jeremy Allison <jra@samba.org>
2010-07-07s3: Add SMB2 performance counters.Ira Cooper1-19/+58
A performance counter was added for every base type of SMB2 op.
2010-06-14SMB2 correctness fix. As we've already returned the credits in an interimJeremy Allison1-0/+2
response, don't add more in the final return. Jeremy.
2010-06-10Ensure we correctly setup req->subreq before testing for async. Stops ↵Jeremy Allison1-4/+4
crashes when XX_send functions set async to stop interim replies being sent. Jeremy.
2010-06-08Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.Jeremy Allison1-67/+67
Based on code from Ira Cooper <samba@ira.wakeful.net>, and also advice on refactoring the patch into a function call. outbuf vectors can be reallocated by smb2 processing code, so when returning interim responses we must not make assumptions about vector size. Jeremy
2010-06-08Fix for bug 7501 - SMB2: CREATE request replies getting mangled.Ira Cooper1-3/+1
Code for dup_smb2_req() was duplicating the wrong vector (i, instead of i+2) when returning a non-minimal SMB2 response.
2010-06-02Ensure we remove SMB2 cancel requests from the active queueJeremy Allison1-0/+1
now we don't remove them in the talloc destructor. Jeremy.
2010-06-02Fix a crash bug found by Ira Cooper <samba@ira.wakeful.net>.Jeremy Allison1-4/+5
A create call comes in, goes async (on the oplock request). At a later time (just before a cancel request is received) it completes, and goes through smbd_smb2_request_reply() to send the reply to the create call. However, the output socket queue is full, so when tstream_writev_queue_send() is called from smbd_smb2_request_reply(), the smb2req stays on the "being processed" queue on sconn->smb2.requests, as only when tstream_writev_queue_send() completes is smbd_smb2_request_writev_done() get called, which will TALLOC_FREE the smb2req (and thus take if off the queue). The cancel comes in, gets processed and looks through the requests on the queue, and BANG - hits the smb2req that has already been processed and is outgoing.... Remove the request from the queue once tstream_writev_queue_send() is called and not in the talloc destructor function. Jeremy.
2010-05-19(Finally) fix bug #7158 - SMB2 connection resets during IOZone tests from ↵Jeremy Allison1-1/+2
64-bit Vista client It turns out that the persistent handles are used by the Microsoft redirector to index files on oplock break requests. So even if we don't do durable handles (yet) we must set the persistent handle on create. For now just use the same handle value as we use for volatile. Jeremy.
2010-05-18Keep track of credits we're giving out. Set initial credits to 1 (MS-SMB2 ↵Jeremy Allison1-1/+8
spec required). Jeremy.
2010-05-07Make us pass all SMB2 lock tests except MULTIPLE-UNLOCK and CONTEXT. Them ↵Jeremy Allison1-0/+8
next :-). Jeremy.
2010-04-28Update (C) for 2010.Jeremy Allison1-0/+1
Jeremy.
2010-04-27Don't return an intermediate reply on async on a pipe call (Windows doesn't).Jeremy Allison1-0/+5
Jeremy.
2010-04-24Implement oplocks within SMB2. Plumb into the existing SMB1 oplock system.Jeremy Allison1-3/+2
Seems to work but needs more tests (to be added). Jeremy.
2010-04-23When sending the initial async response, this is never part of a chain.Jeremy Allison1-1/+1
Get the reply flags correct. Jeremy.
2010-04-22Make deferred opens (NT_STATUS_SHARING_VIOLATION) work over SMB2.Jeremy Allison1-8/+9
Makes SMB2Create call re-entrant internally. Now this infrastructure is in place, oplocks will follow shortly. Tested with Win7 client and with W2K8R2. Jeremy.
2010-04-19Now SMB2 error messages are correctly being returned with the 1 byte data ↵Jeremy Allison1-51/+49
area, smbd_smb2_request_error_ex() must call smbd_smb2_request_done_ex() in order to do the padding correctly on compound replies. Jeremy.
2010-04-19Ensure vectors are always allocated with consistent size. Removes one byte ↵Jeremy Allison1-20/+60
alloc on SMB2 error packet. Always use talloc_zero_array on out vectors - fixes valgrind errors in tevent writes. Jeremy.
2010-04-19Remove an unused auto variable.Jeremy Allison1-3/+0
Jeremy.
2010-04-19s3-smb2: fix some c++ warnings.Günther Deschner1-3/+3
Guenther
2010-04-18Final fix for #7331 - Compound async SMB 2 requests don't work right.Jeremy Allison1-4/+13
Don't free the cancelled SMB2 req early, let the cancelation function take care of it. Return a NT_STATUS_CANCELLED when we find and cancel a request. Fix our SMB2 error returns to correctly set the structuresize to 9, and add the expected zero byte (see section 2.2.2 in the SMB2 spec.). This causes Samba to pass the test program in this bug report that W2K8R2 fails (heh heh :-). This is because we always cause compound requests to get to a cancelation point before dealing with a cancel request. Jeremy.
2010-04-17Second part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison1-58/+158
right. Cause us to match W2K8R2 by sending an interim compound reply followed by a async reply. Jeremy.
2010-04-17First part of fix for bug #7331 - Compound async SMB 2 requests don't work ↵Jeremy Allison1-86/+320
right. Gets us handling SMB2 compound async requests similar to W2K8R2 (and triggers the same client bug in the Win7 redirector). Great thanks to Ira Cooper <samba@ira.wakeful.net> for helping with this and to Metze for the wonderful async framework. The one thing I need to fix to make us identical to W2K8R2 is that when a compound request goes async at the end W2K8R2 splits the replies up into a compound non-async reply followed by a separate async reply. Currently we're doing the whole thing in a compound reply. Jeremy.
2010-04-07Don't forget to initialize *p_creds_requested.Jeremy Allison1-0/+1
Jeremy.
2010-04-06Ensure we total up the correct number of creds requested in a compound request.Jeremy Allison1-1/+7
2010-03-31Make smbd_lock_socket/smbd_unlock_socket recursive with a ref_count.Jeremy Allison1-1/+1
As these always call exit_server, make that part of the function. Use _internal functions for the echo client. Metze please check ! Jeremy.
2010-02-24Change the credential handling so that we start with maxmux creds,Jeremy Allison1-7/+10
and then return to the client the number of credits per operation that they asked for. This is a more sensible algorithm than just blindly returning "20" on every reply, although we will probably still need more changes to this going forward. Jeremy.
2009-08-17s3:smbd: implement SMB2 Cancel correctly.Stefan Metzmacher1-4/+13
metze
2009-08-14s3:smbd: allow SMB2 Cancel to have the async flag setStefan Metzmacher1-6/+8
metze
2009-08-14s3:smbd: fix parsing of the SMB2 bodyStefan Metzmacher1-5/+7
Maybe there's no dynamic part on the wire. metze
2009-08-12libcli: move some common SMB and SMB2 stuff into libcli/smb/Stefan Metzmacher1-1/+1
This will hold code that's shared between source3 and source4. metze