Karolin Seeger
92e17d5fd0
smb2_server: Fix typo in comment.
...
Karolin
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Nov 2 15:40:22 CET 2012 on sn-devel-104
2012-11-02 15:40:22 +01:00
Michael Adam
73fa347507
s3:smbd:smb2: fix a comment typo in the crediting code.
...
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov 2 10:09:36 CET 2012 on sn-devel-104
2012-11-02 10:09:36 +01:00
Jeremy Allison
c2f5b2466b
Fix bug #9214 - Bad user supplied SMB2 credit value can cause smbd to call smb_panic.
...
Terminate the connection cleanly instead.
2012-10-03 12:49:15 -07:00
Stefan Metzmacher
9249871f40
s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()
...
Because we should not call smbd_smb2_request_error() on an
request that is still running.
If the subreq implementes a cancel function, this should
take care of triggering smbd_smb2_request_error.
metze
Signed-off-by: Michael Adam <obnox@samba.org>
2012-09-22 10:18:58 +02:00
Michael Adam
1ae6f9c626
s3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()
...
removes unnneccary checks/assignments for compound_related and next_status
and duplicate setting of error status.
And remove (now) unused next_status from struct smbd_smb2_request.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-09-22 10:18:58 +02:00
Michael Adam
27d38b5c27
s3:smbd:smb2: add check for session_status for compound requests
2012-09-22 10:18:57 +02:00
Stefan Metzmacher
4384485f82
s3:smb2_server: do the req->next_status check before the signing checks
...
Windows 2012 returns NT_STATUS_INVALID_PARAMETER to
the smb2.compound.invalid1 test if that uses signing
(instead of NT_STATUS_ACCESS_DENIED).
metze
2012-09-22 10:18:57 +02:00
Stefan Metzmacher
2552b66323
s3:smb2_server: reset req->last_session_id and req->last_tid after using it
...
If we can find a valid session or tcon we'll set it after the lookup,
but it need to make sure to reset it if we don't find the session.
This fixes a problem where a compound unrelated request between
related requests doesn't reset the session.
If we have 3 requests in a compound chain, request 3 should never
use the id's cached from request 1. It should only every inherit
handles from request 2.
metze
2012-09-22 10:18:57 +02:00
Ira Cooper
7595194619
s3: Compound requests should continue processing.
...
This patch addresses #9173 .
Signed-off-by: Michael Adam <obnox@samba.org>
2012-09-22 10:18:56 +02:00
Stefan Metzmacher
bc77745cfa
s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu()
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Sep 20 07:18:31 CEST 2012 on sn-devel-104
2012-09-20 07:18:31 +02:00
Stefan Metzmacher
069db9b630
s3:smb2_break: encrypt OPLOCK BREAK notifications
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 23 10:01:14 CEST 2012 on sn-devel-104
2012-08-23 10:01:14 +02:00
Stefan Metzmacher
54dfd08cb2
s3:smb2_server: use smbXsrv_session->nonce_*
...
metze
2012-08-23 08:23:07 +02:00
Stefan Metzmacher
6c7ffa9092
s3:smb2_server: remove dump_data() from smbd_smb2_request_pending_timer()
...
This was just for debugging...
metze
2012-08-23 08:23:07 +02:00
Stefan Metzmacher
9397d6709f
s3:smb2_server: add SMB3 encryption support
...
metze
2012-08-17 14:51:57 +02:00
Stefan Metzmacher
16edb6eb7b
s3:smb2_server: try to sign an error response if we have a signing key
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 17 00:54:01 CEST 2012 on sn-devel-104
2012-08-17 00:54:01 +02:00
Stefan Metzmacher
19ca98a162
s3:smb2_server: verify the signature before the session_status
...
metze
2012-08-16 23:13:07 +02:00
Stefan Metzmacher
f4432fea6a
s3:smb2_server: add some const to print_req_vectors()
...
metze
2012-08-16 23:13:07 +02:00
Stefan Metzmacher
b596a116fd
s3:smb2_server: do calculations based on SMBD_SMB2_NUM_IOV_PER_REQ in smbd_smb2_request_validate()
...
metze
2012-08-15 14:45:04 +02:00
Stefan Metzmacher
a0cf42b709
s3:smb2_server: add smbd_smb2_request->do_encryption
...
For now it's always false...
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
b5a72f4f35
s3:smb2_server: check the session before we could response with an error.
...
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
f15d9a6670
s3:smb2_server: do central file_id check if the operation requires it
...
Note that it's fine to call file_fsp_smb2() twice, the 2nd call
just returns smb2req->compat_chain_fsp without a 2nd lookup.
metze
2012-08-09 08:21:35 +02:00
Stefan Metzmacher
1c76e99ae4
s3:smb2_server: s/i/idx in smbd_smb2_request_pending_queue()
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Aug 8 17:32:26 CEST 2012 on sn-devel-104
2012-08-08 17:32:26 +02:00
Stefan Metzmacher
83d262088b
s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() in smbd_smb2_request_pending_queue()
...
metze
2012-08-08 12:52:52 +02:00
Stefan Metzmacher
0067de2074
s3:smb2_server: remove useless variable 'i'
...
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
63d92a192d
s3:smb2_server: rewrite dup_smb2_vec3() using SMBD_SMB2_*_IOV_OFS and helper variables
...
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
fc8e3bd569
s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_done_ex()
...
metze
2012-08-08 12:52:51 +02:00
Stefan Metzmacher
97b5aaa648
s3:smb2_server: make use of SMBD_SMB2_* macros in smbd_smb2_request_verify_sizes()
...
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
05ae95a0d5
s3:smb2_server: use the common buffer layout for smbd_smb2_request_pending*
...
metze
2012-08-08 12:52:50 +02:00
Stefan Metzmacher
9f51d610d2
s3:smb2_server: don't try to update req->in.vector[0] in smbd_smb2_request_pending_queue()
...
req->in.vector[0] is reserved for the transport and might be removed in future.
This is currently always { NULL, 0 }, as it's not used, by our
transport layer code. The SMB2 layer should never touch this!
metze
2012-08-08 12:50:22 +02:00
Stefan Metzmacher
c9ecfd6f3d
s3:smb2_server: sign the last request at the start of smbd_smb2_request_reply()
...
This means we correctly sign all responses in a compound chain.
metze
2012-08-08 05:13:42 +02:00
Stefan Metzmacher
c3016915a1
s3:smb2_server: fix SMB2 signing of compound responses
...
We need to defer the signing until we know the response
doesn't change anymore before it goes over the wire.
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 7 20:29:30 CEST 2012 on sn-devel-104
2012-08-07 20:29:30 +02:00
Stefan Metzmacher
40f771e010
s3:smb2_server: there's no need to copy req->out.vector when we just keep the last request
...
metze
2012-08-07 18:32:47 +02:00
Stefan Metzmacher
8d63efe273
s3:smb2_server: use memmove instead of copying single vector elements
...
metze
2012-08-07 18:32:47 +02:00
Stefan Metzmacher
9b8973d3b5
s3:smb2_server: make use of SMBD_SMB2_OUT_HDR_PTR() smbd_smb2_request_pending_queue()
...
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
bfc87a4a76
s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
...
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
5730272690
s3:smb2_server: make use of SMBD_SMB2_OUT_*_IOV smbd_smb2_request_reply()
...
metze
2012-08-07 18:32:46 +02:00
Stefan Metzmacher
727b1d1fa8
s3:smb2_server: check for compound based on SMBD_SMB2_NUM_IOV_PER_REQ
...
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
2da62179de
s3:smb2_server: make use of SMBD_SMB2_*_IOV_OFS
...
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
d609bb9b42
s3:smb2_server: make use of helper macros in smb2_calculate_credits()
...
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
efaea8e0e1
s3:smb2_server: make use of helper macros in smbd_smb2_request_validate()
...
metze
2012-08-07 18:32:45 +02:00
Stefan Metzmacher
4e6e1ecb6e
s3:smb2_server: make use of SMBD_SMB2_NUM_IOV_PER_REQ
...
metze
2012-08-07 18:32:44 +02:00
Stefan Metzmacher
e7bf8e7e23
s3:smb2_server: do one central as_root check if the operation requires it
...
metze
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 7 13:14:38 CEST 2012 on sn-devel-104
2012-08-07 13:14:38 +02:00
Stefan Metzmacher
eec941e411
s3:smb2_server: do one central tcon check if the operation requires it
...
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
59b9dfa0cb
s3:smb2_server: do one central session check if the operation requires it
...
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
aba6df9f55
s3:smb2_server: add and use smbd_smb2_call()
...
metze
2012-08-07 11:16:37 +02:00
Stefan Metzmacher
e01333242f
s3:smb2_server: add .as_root to smbd_smb2_dispatch_table
...
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
f69ed57d0f
s3:smb2_server: add .need_tcon to smbd_smb2_dispatch_table
...
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
46f7a60e78
s3:smb2_server: add .need_session to smbd_smb2_dispatch_table
...
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
357110c10b
s3:smb2_server: introduce a smbd_smb2_dispatch_table (for now just with names)
...
metze
2012-08-07 11:16:36 +02:00
Stefan Metzmacher
5ac4d3d274
s3:smb2_server: move 'conn' to main block of smbd_smb2_request_dispatch()
...
metze
2012-08-07 11:16:36 +02:00