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: RESOLVED FIXED
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: 2025-01-21 13:50 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
Comment 3 Jule Anger 2024-12-09 08:36:06 UTC
Pushed to autobuild-v4-{21,20}-test.
Comment 4 Samba QA Contact 2024-12-09 09:46:03 UTC
This bug was referenced in samba v4-20-test:

6c4a0272e70db075943732f7caf750d08c45b9de
7e5019e845ad9f2405b4d47ca6a2d34a439db6d2
00fb1d0fe222fec3e68c3d7c25d6723efa862c51
9cdfb755b7a0111e5853ec6fd940c82163fa8bf5
ebf4b30d087b20c6f1e1547005ef9c1c452772f4
c9581976a4ef54fd3a522f6b6290c789d5d6dc56
Comment 5 Samba QA Contact 2024-12-09 16:22:03 UTC
This bug was referenced in samba v4-21-test:

52c3f27061000572d051506ca4878d2e3c5b463c
52b1c6aba35a7bb4939c3f99b7ddf09bf7435a02
ebe5e4c34994be1601ec707c8f80ca129770d07d
b8a543f2ccb9af5765ec5bee8ea16f5f439267d9
4eaf7b8b8558c7ca08d557940b1e287ada787246
e47866ae948fef128627583ffe58a758cc264ca4
Comment 6 Jule Anger 2024-12-10 09:04:11 UTC
Closing out bug report.

Thanks!
Comment 7 Samba QA Contact 2025-01-06 15:34:02 UTC
This bug was referenced in samba v4-21-stable (Release samba-4.21.3):

52c3f27061000572d051506ca4878d2e3c5b463c
52b1c6aba35a7bb4939c3f99b7ddf09bf7435a02
ebe5e4c34994be1601ec707c8f80ca129770d07d
b8a543f2ccb9af5765ec5bee8ea16f5f439267d9
4eaf7b8b8558c7ca08d557940b1e287ada787246
e47866ae948fef128627583ffe58a758cc264ca4
Comment 8 Samba QA Contact 2025-01-21 13:50:04 UTC
This bug was referenced in samba v4-20-stable (Release samba-4.20.7):

6c4a0272e70db075943732f7caf750d08c45b9de
7e5019e845ad9f2405b4d47ca6a2d34a439db6d2
00fb1d0fe222fec3e68c3d7c25d6723efa862c51
9cdfb755b7a0111e5853ec6fd940c82163fa8bf5
ebf4b30d087b20c6f1e1547005ef9c1c452772f4
c9581976a4ef54fd3a522f6b6290c789d5d6dc56