1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-22 02:50:28 +03:00

smbd: Disable smb1 oplock calls when smb1 is disabled

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
David Mulder 2022-03-15 14:38:03 -06:00 committed by Jeremy Allison
parent bed19efa1c
commit 1e0b0402f8

View File

@ -1024,12 +1024,16 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
wait_before_sending_break();
}
#if defined(WITH_SMB1SERVER)
if (sconn->using_smb2) {
#endif
send_break_message_smb2(fsp, break_from, break_to);
#if defined(WITH_SMB1SERVER)
} else {
send_break_message_smb1(fsp, (break_to & SMB2_LEASE_READ) ?
OPLOCKLEVEL_II : OPLOCKLEVEL_NONE);
}
#endif
if ((break_from == SMB2_LEASE_READ) &&
(break_to == SMB2_LEASE_NONE)) {
@ -1106,11 +1110,15 @@ static void process_kernel_oplock_break(struct messaging_context *msg_ctx,
return;
}
#if defined(WITH_SMB1SERVER)
if (sconn->using_smb2) {
#endif
send_break_message_smb2(fsp, 0, OPLOCKLEVEL_NONE);
#if defined(WITH_SMB1SERVER)
} else {
send_break_message_smb1(fsp, OPLOCKLEVEL_NONE);
}
#endif
fsp->sent_oplock_break = BREAK_TO_NONE_SENT;