Project

General

Profile

Bug #10987

SMB1 fails renaming an open file

Added by Gordon Ross 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-05-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Reproduced using the attached "MoveAndDelete1.exe" program.
Map a network drive on a server where only SMB1 is enabled (no SMB2 or later),
create a file (i.e. with notepad) such as T:\dir\FileToDelete.txt,
then run the test program like: MoveAndDelete1 T:\dir\FileToDelete.txt

Before the fix, the program fails with an error.
After the fix, the delete works, no error.


Files

MoveAndDelete1.cp (1.12 KB) MoveAndDelete1.cp Gordon Ross, 2019-05-18 02:35 PM

History

#1

Updated by Gordon Ross 5 months ago

#2

Updated by Gordon Ross 5 months ago

Looks like smb_ofile_rename_check() returns SHARING_VIOLATION.
That's apparently not expected in this situation.
Reworked the sharing checks.

#3

Updated by Gordon Ross 5 months ago

Testing: per. description.
Fix in production since early 2017

#4

Updated by Electric Monk 5 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 575d359d36700f4571e4a87c94966a99b8b7f48a

commit  575d359d36700f4571e4a87c94966a99b8b7f48a
Author: Gordon Ross <gwr@nexenta.com>
Date:   2019-05-29T22:07:47.000Z

    10987 SMB1 fails renaming an open file
    Reviewed by: Matt Barden <matt.barden@nexenta.com>
    Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF