summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/globals.h1
-rw-r--r--source3/smbd/smb2_break.c4
-rw-r--r--source3/smbd/smb2_create.c2
-rw-r--r--source3/smbd/smb2_sesssetup.c2
4 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index b6aa704f18..113e343c3e 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 7ef35749d2..bd0fc566f0 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 20359437fc..eb8b2c527b 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 c79a443892..54f9b0ea99 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;
}