diff options
author | Jeremy Allison <jra@samba.org> | 2004-06-08 22:13:59 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:51:54 -0500 |
commit | effd4a33856bf315122df9e4fbbb241a161caa62 (patch) | |
tree | 5fc864fa1892016c581d07d99529f5e81e071c9b /source3/smbd | |
parent | 7e6734a0dd50c11601c60e86dee202004b2d6a90 (diff) | |
download | samba-effd4a33856bf315122df9e4fbbb241a161caa62.tar.gz samba-effd4a33856bf315122df9e4fbbb241a161caa62.tar.bz2 samba-effd4a33856bf315122df9e4fbbb241a161caa62.zip |
r1089: Removed spurious oplock message in deferred open processing.
Fix smb signing sequence counts.
Jeremy.
(This used to be commit 7e2a5c36614282b6bd50b60360f443549426dd4b)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 10 | ||||
-rw-r--r-- | source3/smbd/oplock.c | 2 | ||||
-rw-r--r-- | source3/smbd/process.c | 10 |
3 files changed, 17 insertions, 5 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 04e074d56e..aca9756628 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -862,6 +862,16 @@ deferred open entry for mid %u, file %s\n", if (!add_deferred_open(mid, ptv, dev, inode, global_oplock_port, fname)) { remove_sharing_violation_open_smb_message(mid); } + + /* + * Push the MID of this packet on the signing queue. + * We only do this once, the first time we push the packet + * onto the deferred open queue, as this has a side effect + * of incrementing the response sequence number. + */ + + srv_defer_sign_response(mid); + SAFE_FREE(de_array); } diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index 6739f5654f..c34fa60954 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -410,7 +410,7 @@ pid %d, port %d, dev = %x, inode = %.0f, mid = %u\n", schedule_sharing_violation_open_smb_message(mid); } - break; + return True; /* * Keep this as a debug case - eventually we can remove it. diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 698c8475f7..05e4d0b1d9 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -121,9 +121,6 @@ static BOOL push_queued_message(enum q_type qt, char *buf, int msg_len, struct t DLIST_ADD_END(smb_sharing_violation_queue, msg, tmp_msg); } - /* Push the MID of this packet on the signing queue. */ - srv_defer_sign_response(SVAL(buf,smb_mid)); - DEBUG(10,("push_message: pushed message length %u on queue %s\n", (unsigned int)msg_len, qt == OPLOCK_QUEUE ? "smb_oplock_queue" : "smb_sharing_violation_queue" )); @@ -138,7 +135,12 @@ static BOOL push_queued_message(enum q_type qt, char *buf, int msg_len, struct t BOOL push_oplock_pending_smb_message(char *buf, int msg_len) { - return push_queued_message(OPLOCK_QUEUE, buf, msg_len, NULL, NULL, 0); + BOOL ret = push_queued_message(OPLOCK_QUEUE, buf, msg_len, NULL, NULL, 0); + if (ret) { + /* Push the MID of this packet on the signing queue. */ + srv_defer_sign_response(SVAL(buf,smb_mid)); + } + return ret; } /**************************************************************************** |