summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-05-02 11:12:47 -0700
committerRichard Sharpe <sharpe@samba.org>2013-05-07 17:58:45 +0200
commit4111fcfd4f570d39d46a0d414546ca62c7b609be (patch)
treef78417509d1c2fe4b510e9d124b279cbbafce25f
parent637887c0795241872974c09838829b49d5994b10 (diff)
downloadsamba-4111fcfd4f570d39d46a0d414546ca62c7b609be.tar.gz
samba-4111fcfd4f570d39d46a0d414546ca62c7b609be.tar.bz2
samba-4111fcfd4f570d39d46a0d414546ca62c7b609be.zip
Only do the 1 second delay for sharing violations for SMB1, not SMB2.
Match Windows behavior. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
-rw-r--r--source3/smbd/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 7d02e52108..53f8b8e093 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2526,10 +2526,11 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn,
/*
* If we're returning a share violation, ensure we
- * cope with the braindead 1 second delay.
+ * cope with the braindead 1 second delay (SMB1 only).
*/
if (!(oplock_request & INTERNAL_OPEN_ONLY) &&
+ !conn->sconn->using_smb2 &&
lp_defer_sharing_violations()) {
struct timeval timeout;
struct deferred_open_record state;