* write. */
/* #define DEFERRED_OPEN_ENTRY 0x20 */ /* Not used anymore */
/* #define UNUSED_SHARE_MODE_ENTRY 0x40 */ /* Not used anymore */
-#define FORCE_OPLOCK_BREAK_TO_NONE 0x80
+/* #define FORCE_OPLOCK_BREAK_TO_NONE 0x80 */ /* Not used anymore */
/* None of the following should ever appear in fsp->oplock_request. */
-#define SAMBA_PRIVATE_OPLOCK_MASK (INTERNAL_OPEN_ONLY|FORCE_OPLOCK_BREAK_TO_NONE)
+#define SAMBA_PRIVATE_OPLOCK_MASK (INTERNAL_OPEN_ONLY)
#define EXCLUSIVE_OPLOCK_TYPE(lck) ((lck) & ((unsigned int)EXCLUSIVE_OPLOCK|(unsigned int)BATCH_OPLOCK))
#define BATCH_OPLOCK_TYPE(lck) ((lck) & (unsigned int)BATCH_OPLOCK)
/* 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,
* 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;
}
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. */
}
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;
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 */
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 */
* if there are no pending writes.
*/
trigger_write_time_update_immediate(new_fsp);
-
close_file(req, new_fsp, NORMAL_CLOSE);
return NT_STATUS_OK;
}
if (TARGET_IS_W2K12(tctx)) {
return 2;
}
+ if (TARGET_IS_SAMBA3(tctx)) {
+ return 2;
+ }
return 1;
}