[PATCH] smb/server: check destination is open when renaming
Ralph Boehme
slow at samba.org
Tue Aug 4 08:44:02 UTC 2026
For POSIX the relevant piece is POSIX-FSA 2.1.4.2 "Server Requests
Closing an Open".
The important nuance being treating "POSIX opens" different from
non-POSIX opens, basically:
- allow rename if there are only other POSIX opens
- fail the rename if there's one or more non-POSIX opens
For SMB3 POSIX we're not planning to use FileRenameInformationEx, as
there's no need for it, the above piece of the spec nicely achieves the
desired behaviour.
Cheers!
-slow
On 8/4/26 10:28 AM, ChenXiaoSong wrote:
> According to MS-FSA 2.1.5.15.12, level 10 (FileRenameInformation), an
> overwrite rename must fail with STATUS_ACCESS_DENIED if the existing
> target still has an open.
>
> MS-FSA 2.1.5.15.12 FileRenameInformation: https://learn.microsoft.com/
> en-us/openspecs/windows_protocols/ms-
> fsa/87f86c9b-6c2a-4803-84b7-131a74a434fa
>
> On 8/4/26 15:53, Namjae Jeon wrote:
>> Okay. We can implement this in ksmbd and cifs.ko to pass generic/035
>> test.
>>
>> Thanks for sharing it.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20260804/a354c8c7/OpenPGP_signature.sig>
More information about the samba-technical
mailing list