[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Wed Sep 14 09:24:03 MDT 2011
The branch, master has been updated
via e80f79a s3:torture/run_oplock4: don't set cli->use_level_II_oplocks
via 563fa74 s3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byte
from af7653c s3-libnet: add missing newlines in debug statement.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e80f79a1fb91ed71cf8d886791ef8485b78b20c3
Author: Stefan Metzmacher <metze at samba.org>
Date: Thu Sep 8 17:24:02 2011 +0200
s3:torture/run_oplock4: don't set cli->use_level_II_oplocks
Doing this after the session setup is pointless,
as that's the only place where we tell the server we support
level II oplocks.
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Wed Sep 14 17:23:46 CEST 2011 on sn-devel-104
commit 563fa741f6a34a1300c81a8474ca87346a9f5cca
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Sep 14 13:04:28 2011 +0200
s3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byte
metze
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/smb2_server.c | 14 +++++++++++++-
source3/torture/torture.c | 3 ---
2 files changed, 13 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 8fbbbc0..d1b7ac5 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1253,9 +1253,12 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
NTSTATUS smbd_smb2_request_verify_sizes(struct smbd_smb2_request *req,
size_t expected_body_size)
{
+ const uint8_t *inhdr;
+ uint16_t opcode;
const uint8_t *inbody;
int i = req->current_idx;
size_t body_size;
+ size_t min_dyn_size = expected_body_size & 0x00000001;
/*
* The following should be checked already.
@@ -1270,6 +1273,15 @@ NTSTATUS smbd_smb2_request_verify_sizes(struct smbd_smb2_request *req,
return NT_STATUS_INTERNAL_ERROR;
}
+ inhdr = (const uint8_t *)req->in.vector[i+0].iov_base;
+ opcode = SVAL(inhdr, SMB2_HDR_OPCODE);
+
+ switch (opcode) {
+ case SMB2_OP_GETINFO:
+ min_dyn_size = 0;
+ break;
+ }
+
/*
* Now check the expected body size,
* where the last byte might be in the
@@ -1278,7 +1290,7 @@ NTSTATUS smbd_smb2_request_verify_sizes(struct smbd_smb2_request *req,
if (req->in.vector[i+1].iov_len != (expected_body_size & 0xFFFFFFFE)) {
return NT_STATUS_INVALID_PARAMETER;
}
- if (req->in.vector[i+2].iov_len < (expected_body_size & 0x00000001)) {
+ if (req->in.vector[i+2].iov_len < min_dyn_size) {
return NT_STATUS_INVALID_PARAMETER;
}
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index ff1175d..0f0c540 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -3761,10 +3761,7 @@ static bool run_oplock4(int dummy)
}
cli1->use_oplocks = true;
- cli1->use_level_II_oplocks = true;
-
cli2->use_oplocks = true;
- cli2->use_level_II_oplocks = true;
status = cli_open(cli1, fname, O_RDWR, DENY_NONE, &fnum1);
if (!NT_STATUS_IS_OK(status)) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list