SMB2: Fix rename on Windows 7.
authorIra Cooper <samba@ira.wakeful.net>
Wed, 2 Jun 2010 00:09:29 +0000 (17:09 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 2 Jun 2010 00:09:29 +0000 (17:09 -0700)
This removes some code Jeremy (jra) suspected was bad.  It turns out that the
command window rename command will not work with the offending code in place.

With it removed the bug is gone, and rename works.

source3/smbd/trans2.c

index 2c0bca939d22896d62cb543b8709421e2f4fffc5..f69cefe66b54d73e89d5901100876a7cb046205d 100644 (file)
@@ -6003,14 +6003,6 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
                return status;
        }
 
-       /* Ok, this looks wrong to me, but appears to
-        * be how SMB2 renames work. CHECK WITH Microsoft !
-        * jra.
-        */
-       if (fsp->oplock_type != NO_OPLOCK) {
-               return NT_STATUS_SHARING_VIOLATION;
-       }
-
        if (fsp->base_fsp) {
                /* newname must be a stream name. */
                if (newname[0] != ':') {