summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c15
-rw-r--r--source3/smbd/oplock.c1
-rw-r--r--source3/smbd/trans2.c5
3 files changed, 4 insertions, 17 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index c28d2a39fa..f4210d7417 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1184,14 +1184,6 @@ static NTSTATUS send_break_message(files_struct *fsp,
/* Create the message. */
share_mode_entry_to_message(msg, exclusive);
- /* Add in the FORCE_OPLOCK_BREAK_TO_NONE bit in the message if set. We
- don't want this set in the share mode struct pointed to by lck. */
-
- if (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE) {
- SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET,
- exclusive->op_type | FORCE_OPLOCK_BREAK_TO_NONE);
- }
-
status = messaging_send_buf(fsp->conn->sconn->msg_ctx, exclusive->pid,
MSG_SMB_BREAK_REQUEST,
(uint8 *)msg,
@@ -1914,10 +1906,7 @@ static int calculate_open_access_flags(uint32_t access_mask,
* mean the same thing under DOS and Unix.
*/
- need_write =
- ((access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA)) ||
- (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE));
-
+ need_write = (access_mask & (FILE_WRITE_DATA | FILE_APPEND_DATA));
if (!need_write) {
return O_RDONLY;
}
@@ -2181,7 +2170,7 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
open_access_mask = access_mask;
- if ((flags2 & O_TRUNC) || (oplock_request & FORCE_OPLOCK_BREAK_TO_NONE)) {
+ if (flags2 & O_TRUNC) {
open_access_mask |= FILE_WRITE_DATA; /* This will cause oplock breaks. */
}
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 434bafa3ca..4cdf68bc65 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -535,7 +535,6 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) && koplocks;
if ((global_client_caps & CAP_LEVEL_II_OPLOCKS) &&
- !(msg.op_type & FORCE_OPLOCK_BREAK_TO_NONE) &&
!(use_kernel && !(koplocks->flags & KOPLOCKS_LEVEL2_SUPPORTED)) &&
lp_level2_oplocks(SNUM(fsp->conn))) {
break_to_level2 = True;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index aaf0e62289..e6bb12c42f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5900,7 +5900,7 @@ static NTSTATUS smb_set_file_size(connection_struct *conn,
FILE_OPEN, /* create_disposition*/
0, /* create_options */
FILE_ATTRIBUTE_NORMAL, /* file_attributes */
- FORCE_OPLOCK_BREAK_TO_NONE, /* oplock_request */
+ 0, /* oplock_request */
0, /* allocation_size */
0, /* private_flags */
NULL, /* sd */
@@ -6891,7 +6891,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
FILE_OPEN, /* create_disposition*/
0, /* create_options */
FILE_ATTRIBUTE_NORMAL, /* file_attributes */
- FORCE_OPLOCK_BREAK_TO_NONE, /* oplock_request */
+ 0, /* oplock_request */
0, /* allocation_size */
0, /* private_flags */
NULL, /* sd */
@@ -6919,7 +6919,6 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn,
* if there are no pending writes.
*/
trigger_write_time_update_immediate(new_fsp);
-
close_file(req, new_fsp, NORMAL_CLOSE);
return NT_STATUS_OK;
}