Only do the 1 second delay for sharing violations for SMB1, not SMB2.
authorJeremy Allison <jra@samba.org>
Thu, 2 May 2013 18:12:47 +0000 (11:12 -0700)
committerRichard Sharpe <sharpe@samba.org>
Tue, 7 May 2013 15:58:45 +0000 (17:58 +0200)
Match Windows behavior.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
source3/smbd/open.c

index 7d02e521081467bb32d5d4c7ca8561e69ac6ae77..53f8b8e093583daa8a966ae76fd9f5e1390e1b1a 100644 (file)
@@ -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;