diff options
author | Jeremy Allison <jra@samba.org> | 2010-05-12 15:19:45 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-05-12 15:19:45 -0700 |
commit | 1101c6214415675fbd32377d539276ca19c4407f (patch) | |
tree | 47df8ab4c8eed4449e25cb431c8898001c4981f3 /source3 | |
parent | 9cddf891ad2a09ed1de83f3b51b4f2fc3e6855e8 (diff) | |
download | samba-1101c6214415675fbd32377d539276ca19c4407f.tar.gz samba-1101c6214415675fbd32377d539276ca19c4407f.tar.bz2 samba-1101c6214415675fbd32377d539276ca19c4407f.zip |
Pass more SMB2 oplock tests. Only oplock stream tests left to fix.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/oplock.c | 5 | ||||
-rw-r--r-- | source3/smbd/smb2_break.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index d00bcba32a..1ff1737a3f 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -320,7 +320,10 @@ static void oplock_timeout_handler(struct event_context *ctx, TALLOC_FREE(fsp->oplock_timeout); DEBUG(0, ("Oplock break failed for file %s -- replying anyway\n", fsp_str_dbg(fsp))); - global_client_failed_oplock_break = True; + /* Only set this for SMB1.. */ + if (!smbd_server_conn->allow_smb2) { + global_client_failed_oplock_break = True; + } remove_oplock(fsp); reply_to_oplock_break_requests(fsp); } diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index bd0fc566f0..a214da0f26 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -204,6 +204,12 @@ static struct tevent_req *smbd_smb2_oplock_break_send(TALLOC_CTX *mem_ctx, fsp_str_dbg(fsp), fsp->fnum )); + /* Are we awaiting a break message ? */ + if (fsp->oplock_timeout == NULL) { + tevent_req_nterror(req, NT_STATUS_INVALID_OPLOCK_PROTOCOL); + return tevent_req_post(req, ev); + } + if ((fsp->sent_oplock_break == BREAK_TO_NONE_SENT) || (break_to_none)) { result = remove_oplock(fsp); |