mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Correctly toggle the signing state to what it was previosly when sending
an oplock break. Jeremy.
This commit is contained in:
parent
8d2a848052
commit
9515de83a8
@ -491,21 +491,14 @@ static struct smb_sign_info srv_sign_info = {
|
||||
};
|
||||
|
||||
/***********************************************************
|
||||
Turn on signing after sending an oplock break.
|
||||
Turn signing off or on for oplock break code.
|
||||
************************************************************/
|
||||
|
||||
void srv_enable_signing(void)
|
||||
BOOL srv_oplock_set_signing(BOOL onoff)
|
||||
{
|
||||
srv_sign_info.doing_signing = True;
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
Turn off signing before sending an oplock break.
|
||||
************************************************************/
|
||||
|
||||
void srv_disable_signing(void)
|
||||
{
|
||||
srv_sign_info.doing_signing = False;
|
||||
BOOL ret = srv_sign_info.doing_signing;
|
||||
srv_sign_info.doing_signing = onoff;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************
|
||||
|
@ -660,6 +660,7 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id,
|
||||
time_t start_time;
|
||||
BOOL shutdown_server = False;
|
||||
BOOL oplock_timeout = False;
|
||||
BOOL sign_state;
|
||||
connection_struct *saved_user_conn;
|
||||
connection_struct *saved_fsp_conn;
|
||||
int saved_vuid;
|
||||
@ -742,12 +743,16 @@ static BOOL oplock_break(SMB_DEV_T dev, SMB_INO_T inode, unsigned long file_id,
|
||||
/* Remember if we just sent a break to level II on this file. */
|
||||
fsp->sent_oplock_break = using_levelII? LEVEL_II_BREAK_SENT:EXCLUSIVE_BREAK_SENT;
|
||||
|
||||
srv_disable_signing();
|
||||
/* Save the server smb signing state. */
|
||||
sign_state = srv_oplock_set_signing(False);
|
||||
|
||||
if (!send_smb(smbd_server_fd(), outbuf)) {
|
||||
srv_enable_signing();
|
||||
srv_oplock_set_signing(sign_state);
|
||||
exit_server("oplock_break: send_smb failed.");
|
||||
}
|
||||
srv_enable_signing();
|
||||
|
||||
/* Restore the sign state to what it was. */
|
||||
srv_oplock_set_signing(sign_state);
|
||||
|
||||
/* We need this in case a readraw crosses on the wire. */
|
||||
global_oplock_break = True;
|
||||
|
Loading…
Reference in New Issue
Block a user