summaryrefslogtreecommitdiffstats
path: root/source3/smbd/smb2_server.c
Commit message (Collapse)AuthorAgeFilesLines
* s3:smb2_server: fix a compiler warningChristian Ambach2012-03-141-2/+2
| | | | | Autobuild-User: Christian Ambach <ambi@samba.org> Autobuild-Date: Wed Mar 14 16:06:48 CET 2012 on sn-devel-104
* s3: Fix a 64-bit warningVolker Lendecke2012-03-101-1/+1
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Sat Mar 10 15:27:09 CET 2012 on sn-devel-104
* Fix up Christian Ambach's multi-credit code - the CreditCharge field is a ↵Jeremy Allison2012-03-091-2/+2
| | | | 16-bit int read, not a 32-bit one.
* s3:smb2_server validate message ids with largemtuChristian Ambach2012-03-091-27/+56
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server add function to verify creditchargeChristian Ambach2012-03-091-0/+39
| | | | Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server fix a typoChristian Ambach2012-03-021-1/+1
|
* libcli/smb/smb2_signing: pass down 'protocol' to smb2_signing_[sign|check]_pdu()Stefan Metzmacher2012-02-271-0/+4
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Feb 27 14:26:32 CET 2012 on sn-devel-104
* Fix a bunch of "unused variable" warnings.Jeremy Allison2012-02-181-2/+0
| | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Feb 18 06:22:40 CET 2012 on sn-devel-104
* s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctxStefan Metzmacher2011-12-121-9/+7
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
* s3:smbd: remember the event context on smbd_server_connectionStefan Metzmacher2011-12-121-1/+1
| | | | metze
* Ensure we correctly calculate reply credits over all returnedJeremy Allison2011-11-151-4/+13
| | | | | | SMB2 replies, and do as Windows does and return the total in the last SMB2 reply. Fixes an issue found by Christian M Ambach <christian.ambach@de.ibm.com> (and thanks to Christian for the initial patch this was based on).
* s3:smb2_server: pass explicit defer_times to smbd_smb2_request_pending_queue()Stefan Metzmacher2011-11-151-2/+2
| | | | metze
* s3:smb2_server: always send STATUS_PENDING responses, but delayed by 0.5 ↵Stefan Metzmacher2011-11-151-105/+120
| | | | | | | | milliseconds In future we'll pass the delay from the caller. metze
* s3:smb2_server: grant credits in async interim responses (bug #8357)Stefan Metzmacher2011-11-091-1/+3
| | | | | | | | | | | The first fix for bug #8357 intruduced a regression, so that we no longer grant credits for real async interim responses with STATUS_PENDING. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 9 11:56:29 CET 2011 on sn-devel-104
* s3:smb2_server: remove unused outhdr variablesDavid Disseldorp2011-11-021-2/+0
|
* s3:smb2_server: FLAG_CHAINED means we always use the last session_id and tidStefan Metzmacher2011-10-311-33/+18
| | | | metze
* s3:smb2_server: don't reset the tid and session id in the out hdr of ↵Stefan Metzmacher2011-10-311-14/+0
| | | | | | | | | compound requests Windows also leaves tid (0xFFFFFFFF) and session id (0xFFFFFFFFFFFFFFFF) as the client requested them. metze
* s3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fieldsStefan Metzmacher2011-10-311-2/+4
| | | | | | Windows just echos back the given values by default. metze
* s3-smb2_server: SMB2_OP_IOCTL doesn't require at least 1 dyn byteDavid Disseldorp2011-09-291-0/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_server: SMB2_OP_CANCEL requests don't have to be signedStefan Metzmacher2011-09-291-0/+2
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 29 02:58:41 CEST 2011 on sn-devel-104
* s3:smbd: disconnect the socket if we got an unexpected requestStefan Metzmacher2011-09-231-0/+20
| | | | | | | | | | | If we got a SMB2_OP_NEGPROT after the protocol is already negotiated or if we got a non SMB2_OP_NEGPROT before the protocol was negotiated we should close the connection (as windows does). metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 12:30:50 CEST 2011 on sn-devel-104
* s3:smbd: don't call smbd_terminate_connection in smb2_validate_message_id() ↵Stefan Metzmacher2011-09-231-2/+3
| | | | | | | | (bug #8476) Only return false and the caller will terminate the connection. metze
* Fix bug #8476 - Samba asserts when SMB2 client breaks the crediting rules.Jeremy Allison2011-09-221-1/+6
| | | | | | | Just drop the connection, not SMB_ASSERT. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Sep 22 19:41:31 CEST 2011 on sn-devel-104
* s3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byteStefan Metzmacher2011-09-141-1/+13
| | | | metze
* s3:smb2_server: add smbd_smb2_request_verify_sizes()Stefan Metzmacher2011-09-071-0/+42
| | | | metze
* Fix bug 8429 - Compound SMB2 requests on an IPC connection can corrupt the ↵Jeremy Allison2011-08-311-12/+17
| | | | | | | reply stream. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Aug 31 21:18:11 CEST 2011 on sn-devel-104
* Based on metze's fix for Bug 8407 - SMB2 server can return requests ↵Jeremy Allison2011-08-311-2/+38
| | | | out-of-order when processing a compound request. (cherry picked from commit 19db1c98c6ba3cb5e883e16e865c44900ce17444)
* s3:smb2_server: keep compound_related on struct smbd_smb2_requestStefan Metzmacher2011-08-311-4/+3
| | | | | metze (cherry picked from commit cda93f04eb4e7e975b192a5fd33275ec638140ac)
* s3:smb2_server: make sure we prefer responses over requests on the client socketStefan Metzmacher2011-08-121-12/+52
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Aug 12 16:46:43 CEST 2011 on sn-devel-104
* s3:smb2_server: make sure we grant credits on async read/write operations ↵Stefan Metzmacher2011-08-071-6/+15
| | | | | | | | | | | | | (bug #8357) Currently we skip, the "gone async" interim response on read and write, this caused the aio code path to grant 0 credits to the client in the read/write responses. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Aug 7 22:23:57 CEST 2011 on sn-devel-104
* Secod part of bugfix for bug #8335 - file copy aborts with ↵Jeremy Allison2011-07-291-3/+24
| | | | | | | | | | | | | | | | | smb2_validate_message_id: bad message_id Modify the credit granting algorithm to closer to what I believe Windows does. Split up max_credits into 1/16ths, and then scale the requested credits by how many 16ths have been currently granted. Less than 1/16th == grant all requested (100%), scale down as more have been granted. Never ask for less than 1 if the client asked for at least 1. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 29 20:37:42 CEST 2011 on sn-devel-104
* s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_infoAndrew Bartlett2011-07-201-1/+1
| | | | | | | | | | | | This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2011-07-201-2/+2
| | | | | | | | This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next ↵Jeremy Allison2011-07-081-0/+130
| | | | | | | to their only user and make them static. Add comments. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 21:01:40 CEST 2011 on sn-devel-104
* s3:smb2_server: add some comments about change_to_user() and ↵Stefan Metzmacher2011-07-081-2/+98
| | | | | | | | | change_to_root_user() metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Jul 8 13:45:46 CEST 2011 on sn-devel-104
* lib/util Move bitmap.c to lib/utilAndrew Bartlett2011-07-081-0/+1
|
* Fix bug #8293 - SMB2 doesn't rotate the log files often enough.Jeremy Allison2011-07-081-0/+17
| | | | | | | | | | Move the num_requests field out of the smb1 struct into the generic struct smbd_server_connection struct. Use it to count SMB2 requests as well as SMB1 and ensure that check_log_size() is called every 50 SMB2 requests. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 01:14:53 CEST 2011 on sn-devel-104
* s3:smb2_server: call change_to_root_user() or smbd_smb2_request_check_tcon()Stefan Metzmacher2011-07-071-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | For all requests which don't operate on a tcon, we should call change_to_root_user(), to match the SMB1 behavior. For SMB1 we do the following operations without AS_USER: /* 0x70 */ { "SMBtcon",reply_tcon,0}, /* 0x71 */ { "SMBtdis",reply_tdis,DO_CHDIR}, /* 0x72 */ { "SMBnegprot",reply_negprot,0}, /* 0x73 */ { "SMBsesssetupX",reply_sesssetup_and_X,0}, /* 0x74 */ { "SMBulogoffX",reply_ulogoffX, 0}, /* ulogoff doesn't give a valid TID */ /* 0x75 */ { "SMBtconX",reply_tcon_and_X,0}, ... /* 0x2b */ { "SMBecho",reply_echo,0}, ... /* 0xa4 */ { "SMBntcancel",reply_ntcancel, 0 }, For SMB2tdis we still call smbd_smb2_request_check_tcon() as close_cnum() calls change_to_root_user() when needed. metze Signed-off-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: there's no reason to check the session id twice on a ↵Stefan Metzmacher2011-07-041-5/+0
| | | | | | | | | smb2_tcon request metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Jul 4 17:34:13 CEST 2011 on sn-devel-104
* Second part of fix for bug #8219 - SMB Panic from Windows 7 Client.Jeremy Allison2011-06-291-1/+1
| | | | | | | | | | | | Pass in the correct vector to the signing algorithm in an async response - we must start with vector[1] which has the SMB2_HDR_BODY length, not vector[0] which is the 4 byte packet length. Also note we're passing in 2 vectors not 3. Metze please review. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jun 29 20:09:21 CEST 2011 on sn-devel-104
* Fix bug #8219 - SMB Panic from Windows 7 ClientJeremy Allison2011-06-291-0/+8
| | | | | | | | | Caused by referencing an uninitialized variable in the duplicated struct smbd_smb2_request when sending a signed intermediate reply. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jun 29 04:37:28 CEST 2011 on sn-devel-104
* s3-globals Remove smbd_event_context() (use server_event_context())Andrew Bartlett2011-05-311-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
* s3: Slightly simplify smbd_smb2_request_next_vectorVolker Lendecke2011-05-121-3/+5
| | | | Metze, Jeremy, please check!
* More simple const fixes.Jeremy Allison2011-05-051-4/+4
|
* s3: Fix dup_smb2_vec3Volker Lendecke2011-05-051-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
* s3-tevent: only include ../lib/util/tevent wrappers where needed.Günther Deschner2011-04-291-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
* s3: only include smb profiling where needed.Günther Deschner2011-04-141-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
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* Change "security=share" to downgrade to SMB1 from SMB2, rather than trying ↵Jeremy Allison2011-01-271-8/+0
| | | | to fake it.
* s3: Fix a C++ warningVolker Lendecke2011-01-171-1/+1
|