Bug 15697 - Compound rename from Mac clients can fail with NT_STATUS_INTERNAL_ERROR if the file has a lease
Summary: Compound rename from Mac clients can fail with NT_STATUS_INTERNAL_ERROR if th...
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-19 13:00 UTC by Ralph Böhme
Modified: 2024-12-06 10:56 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.20 and 4.21 cherry-picked from master (44.74 KB, patch)
2024-11-04 10:53 UTC, Ralph Böhme
metze: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2024-08-19 13:00:21 UTC
Mac sends compound rename request (create+setinfo+close) which will fail with NT_STATUS_INTERNAL_ERROR if the file has a lease so the setinfo triggers a lease break and wants to go async, as we don't allow async processing in a compound chain if the request is not the last one as required by MS-SMB2.

It seems Windows is processing such requests without going async, bug 13634 has a network trace (attachment 14507 [details]) where packet 3210 to 3213 show that Windows server handles this just fine with a lease break. The situation is slightly different there, as the handle that is broken is a stream of the file that is about to be renamed (where we currently would return NT_STATUS_ACCESS_DENIED, another behaviour difference).

In bug 15172 we fixed a similar issue for SMB2-FLUSH, the likely fix for this one would be to use the same logic to allow the compound rename.
Comment 1 Samba QA Contact 2024-10-31 12:48:04 UTC
This bug was referenced in samba master:

4932b433ff2f1c4e603073624a5d22140acfb2ed
42e739ab62cb573d72215737027cf3c7f1fcd212
3890ac2fafc5e17919fa39542440a05ef72a3fa5
a5635791cfdb10f64bf2bf7c72c58f7591249a0d
bc2d87981967bc65155ba09eb5b3e3f913bec50e
efbbe8d6f80ceb6107f20486623eee949409c0ff
Comment 2 Ralph Böhme 2024-11-04 10:53:40 UTC
Created attachment 18490 [details]
Patch for 4.20 and 4.21 cherry-picked from master