[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri May 21 11:32:02 MDT 2010
The branch, master has been updated
via 28b8d42... s3: added support for fake oplocks in SMB2.
from dd3c367... s4-smbtorture: Fix NetUserPasswordSet2 RAP tests.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 28b8d421364a1d55bf28a2552f58b5e4325d2bbb
Author: Ira Cooper <samba at ira.wakeful.net>
Date: Thu May 20 11:13:37 2010 -0400
s3: added support for fake oplocks in SMB2.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/smb2_create.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index cc65df2..31813cc 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -421,9 +421,17 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
int info;
struct timespec write_time_ts;
struct smb2_create_blobs out_context_blobs;
+ int requested_oplock_level;
ZERO_STRUCT(out_context_blobs);
+ if(lp_fake_oplocks(SNUM(smb2req->tcon->compat_conn))) {
+ requested_oplock_level = NO_OPLOCK;
+ } else {
+ requested_oplock_level = in_oplock_level;
+ }
+
+
if (!smb2req->async) {
/* New create call. */
req = tevent_req_create(mem_ctx, &state,
@@ -695,7 +703,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
in_create_disposition,
in_create_options,
in_file_attributes,
- map_smb2_oplock_levels_to_samba(in_oplock_level),
+ map_smb2_oplock_levels_to_samba(requested_oplock_level),
allocation_size,
0, /* private_flags */
sec_desc,
@@ -766,7 +774,11 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
smb2req->compat_chain_fsp = smb1req->chain_fsp;
- state->out_oplock_level = map_samba_oplock_levels_to_smb2(result->oplock_type);
+ if(lp_fake_oplocks(SNUM(smb2req->tcon->compat_conn))) {
+ state->out_oplock_level = in_oplock_level;
+ } else {
+ state->out_oplock_level = map_samba_oplock_levels_to_smb2(result->oplock_type);
+ }
if ((in_create_disposition == FILE_SUPERSEDE)
&& (info == FILE_WAS_OVERWRITTEN)) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list