The branch, master has been updated
via ae9fe3c... SMB2 always have level2 oplock capability. Correct
mapping from break messages to SMB2 oplock levels.
from a776933... Stop us crashing in SMB2-OPLOCK test. Don't allow more
than one outstanding immediate event.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit ae9fe3cc8e8dbdb40853e62f3ea7d9e4e4809850
Author: Jeremy Allison <[email protected]>
Date: Mon May 10 14:23:44 2010 -0700
SMB2 always have level2 oplock capability. Correct mapping from break
messages to SMB2 oplock levels.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/globals.h | 1 -
source3/smbd/smb2_break.c | 4 +++-
source3/smbd/smb2_create.c | 2 +-
source3/smbd/smb2_sesssetup.c | 2 ++
4 files changed, 6 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index b6aa704..113e343 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -324,7 +324,6 @@ void cancel_pending_lock_requests_by_fid_smb2(files_struct
*fsp,
enum file_close_type close_type);
/* From smbd/smb2_create.c */
int map_smb2_oplock_levels_to_samba(uint8_t in_oplock_level);
-uint8_t map_samba_oplock_levels_to_smb2(int oplock_type);
bool get_deferred_open_message_state_smb2(struct smbd_smb2_request *smb2req,
struct timeval *p_request_time,
void **pp_state);
diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c
index 7ef3574..bd0fc56 100644
--- a/source3/smbd/smb2_break.c
+++ b/source3/smbd/smb2_break.c
@@ -252,7 +252,9 @@ static NTSTATUS smbd_smb2_oplock_break_recv(struct
tevent_req *req,
void send_break_message_smb2(files_struct *fsp, int level)
{
- uint8_t smb2_oplock_level = map_samba_oplock_levels_to_smb2(level);
+ uint8_t smb2_oplock_level = (level == OPLOCKLEVEL_II) ?
+ SMB2_OPLOCK_LEVEL_II :
+ SMB2_OPLOCK_LEVEL_NONE;
NTSTATUS status;
DEBUG(10,("send_break_message_smb2: sending oplock break "
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 2035943..eb8b2c5 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -46,7 +46,7 @@ int map_smb2_oplock_levels_to_samba(uint8_t in_oplock_level)
}
}
-uint8_t map_samba_oplock_levels_to_smb2(int oplock_type)
+static uint8_t map_samba_oplock_levels_to_smb2(int oplock_type)
{
if (BATCH_OPLOCK_TYPE(oplock_type)) {
return SMB2_OPLOCK_LEVEL_BATCH;
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index c79a443..54f9b0e 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -332,6 +332,8 @@ static NTSTATUS smbd_smb2_session_setup(struct
smbd_smb2_request *req,
}
*out_session_id = session->vuid;
+
+ global_client_caps |= (CAP_LEVEL_II_OPLOCKS|CAP_STATUS32);
return status;
}
--
Samba Shared Repository