summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/blocking.c2
-rw-r--r--source3/smbd/notify.c2
-rw-r--r--source3/smbd/oplock.c4
-rw-r--r--source3/smbd/process.c11
4 files changed, 16 insertions, 3 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index fed3a51b88..8fa2a6494e 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -148,7 +148,7 @@ for fnum = %d, name = %s\n", length, (int)blr->expire_time, lock_timeout,
blr->fsp->fnum, blr->fsp->fsp_name ));
/* Push the MID of this packet on the signing queue. */
- srv_defer_sign_response(SVAL(inbuf,smb_mid));
+ srv_defer_sign_response(SVAL(inbuf,smb_mid), True);
return True;
}
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 9adf827c79..ca6f2b783f 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -199,7 +199,7 @@ BOOL change_notify_set(char *inbuf, files_struct *fsp, connection_struct *conn,
DLIST_ADD(change_notify_list, cnbp);
/* Push the MID of this packet on the signing queue. */
- srv_defer_sign_response(SVAL(inbuf,smb_mid));
+ srv_defer_sign_response(SVAL(inbuf,smb_mid), True);
return True;
}
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index 19e6956d9e..49a1b7d8cf 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -743,6 +743,10 @@ 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;
+ /* Ensure the reply for the open uses the correct sequence number. */
+ /* This isn't a real deferred packet as it's response will also increment
+ * the sequence. */
+ srv_defer_sign_response(get_current_mid(), False);
/* Save the server smb signing state. */
sign_state = srv_oplock_set_signing(False);
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index dce1c4bc03..373c2f16ae 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -48,6 +48,15 @@ BOOL global_machine_password_needs_changing = False;
extern int max_send;
/****************************************************************************
+ Function to return the current request mid from Inbuffer.
+****************************************************************************/
+
+uint16 get_current_mid(void)
+{
+ return SVAL(InBuffer,smb_mid);
+}
+
+/****************************************************************************
structure to hold a linked list of queued messages.
for processing.
****************************************************************************/
@@ -88,7 +97,7 @@ static BOOL push_message(ubi_slList *list_head, char *buf, int msg_len)
ubi_slAddTail( list_head, msg);
/* Push the MID of this packet on the signing queue. */
- srv_defer_sign_response(SVAL(buf,smb_mid));
+ srv_defer_sign_response(SVAL(buf,smb_mid), True);
return True;
}