git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd3c367
)
s3: added support for fake oplocks in SMB2.
author
Ira Cooper
<samba@ira.wakeful.net>
Thu, 20 May 2010 15:13:37 +0000
(11:13 -0400)
committer
Jeremy Allison
<jra@samba.org>
Fri, 21 May 2010 16:57:33 +0000
(09:57 -0700)
source3/smbd/smb2_create.c
patch
|
blob
|
history
diff --git
a/source3/smbd/smb2_create.c
b/source3/smbd/smb2_create.c
index cc65df235ca8d7247b7df2353f33ef5041122e63..31813cc82ebc52bd24f5126ae47e7444d1ac15e7 100644
(file)
--- 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 info;
struct timespec write_time_ts;
struct smb2_create_blobs out_context_blobs;
+ int requested_oplock_level;
ZERO_STRUCT(out_context_blobs);
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,
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,
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,
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;
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)) {
if ((in_create_disposition == FILE_SUPERSEDE)
&& (info == FILE_WAS_OVERWRITTEN)) {