Re: [PATCH] smb/server: check destination is open when renaming

Ralph Boehme <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <[email protected]>
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.
>
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEE+uLGCIokJSBRxVnkqh6bcSY5nkYFAmpxplIFAwAAAAAACgkQqh6bcSY5nkZV
9w//SzWWdNWRBkE1V/j0pMMKZH4wdTXYtEOEgtYCbC9tY1MxMhsf0zlHraT9+HFIE9RoMw87TsKv
DxTijMawiBhyDbJDj+12bt+e3AbWeAzq5IX5gSjCHTH+3KZyjL59FRe/SIt/AlElj6HFGFJUjAGm
7noojrFmtb9s5vCKmLqJp/ddyAM/o9MDfRU2PoAIDjjOKWudmjFqOTebaOj3RYiatJl89T8kUzmT
c2+6NCdxIKaHi5mjy8fZcoXSPW0BeUqeYRlkMFe3OgG944dQhF94eqyg/E/pQo8k56LgOvW/pQEY
f9df30X5FmgTpXlkutN96ZHk5Wrbet0CrPe6czmmL6/52VNhO1Fcr2xOMk5xwx4dGA1SjcKjuIgf
7LSH8q7sGJEsKEi0QFU3anksVxeuAk5A8rDhatpt+o9Oq24NyGHKqri1PWG6cCXeuhsix4g5LAUK
YhtZbUmu/99Nwh4hdlEkRf3wi9QZcmMsUEuLAX2mEuQLE36m0o7vszyKvgWnat56TGz6KmGPbcDj
QnicyrKXpzhR8+RkbDOP2E3AIOoQkAj2cQtmtjnGPodPgmPnYoFxUCBB2I9eFSU27m7GKEH9ohnE
ubUmPqk7oDM9mIqmULFS7Owi7PXwpWD5IEO0iZSN7HZqnDAW90DjkGJzFQtfNPYRHKAdRv+msNm8
8po=
=UAGD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.