Bug 15926 - Samba 4.22 breaks Time Machine
Summary: Samba 4.22 breaks Time Machine
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: 2025-10-02 14:26 UTC by Ralph Böhme
Modified: 2025-12-18 16:14 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.23 backported from master (25.37 KB, patch)
2025-10-14 09:14 UTC, Ralph Böhme
vl: review+
Details
Patch for 4.22 backported from master (25.30 KB, patch)
2025-10-14 09:15 UTC, Ralph Böhme
vl: review+
Details
Followup patch for 4.22 and 4.23 cherry-picked from master (1.12 KB, patch)
2025-11-21 10:42 UTC, Ralph Böhme
vl: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2025-10-02 14:26:25 UTC
As part of the backup TM tries to rename a directory while having an open file within the directory. Windows requires this to fail and this is what Samba also implements. There used to be a workaround for Macs by using fruit:posix_rename but that option was removed in 4.22 as it imposed an unreasonable development burden due to introducing hard to follow logic in very complex code. As part of implementing SMB3 UNIX Extensions in Samba, this part of the code has to be modified and this was only sensibly possible after removing the  fruit:posix_rename code.

As an alternative, fruit shuld be extended to internally make macOS clients POSIX clients so they can benefit from the existing logic in Samba that allows such renames if all opens (recursively) are POSIX opens.

Have patch, need bugnumber.
Comment 1 Samba QA Contact 2025-10-10 11:44:03 UTC
This bug was referenced in samba master:

3052839636f185307edb8832de9bdba4b2e2c83c
795a8c0e84f2bf2b70c8070737183e33f4254a54
777db5b50689d28c53d6b0116818601fd8e52aa8
68ed6279335cfac13a624ae8a7738dac3d9b0d1a
e86f0c2de80e2409bfe3fc12df24e94470988e3c
75fa416f911f1f30aae8bdf14b423140874acaa0
b3132202cf787cc9fb061e39eaf1509157f53953
a112978ed1240c399eb90e4472d5c43d867c49d9
Comment 2 Ralph Böhme 2025-10-14 09:14:47 UTC
Created attachment 18754 [details]
Patch for 4.23 backported from master
Comment 3 Ralph Böhme 2025-10-14 09:15:09 UTC
Created attachment 18755 [details]
Patch for 4.22 backported from master
Comment 4 Jule Anger 2025-10-15 13:37:10 UTC
Pushed to autobuild-v4-{23,22}-test.
Comment 5 Samba QA Contact 2025-10-15 15:11:03 UTC
This bug was referenced in samba v4-23-test:

195499a86fc8d5beb4c453e85a758a069e881581
aee9fcf829724e560ee8571221355045760369f8
2ad0cafc89dd8fa3b34bb6a66d215a518519c26c
2ed0f530269d5fe19c6a216fdf0a584616fecd95
8fb5d5dde4c4a9c7edf36d89b4d7c5bb05be10b4
04d9de203947e45b8791e9b96ceb538a3a2467a5
d5d6d5f5bbeb213d5fea930714523913fc0aa1e6
fda3bc7f2ce2c6105be1e42a14d885912196c7f8
Comment 6 Samba QA Contact 2025-10-15 16:05:03 UTC
This bug was referenced in samba v4-22-test:

bafb6107ef24fc272afc156f52ee7db4e3cea2d3
01deeae7a116e4070c04b49ec5c6535b89597cbc
0d7fb9f3e5b2d8e940f7c88ae9d60c9dbfc4dc31
4cb3c9692c52dfbe8a59c42e9b1a0637ffbaf3b6
353b950083a7a670baecbfab6fc7a97a1cb45979
7973c12234ae6d116cae0d9a3b9e5135b7f36a4d
ad1a318929e957dd7cc237a92ffa167a4cf50777
544e46f1d792e930893ca3b377ecc1f53585662c
Comment 7 Jule Anger 2025-10-15 16:33:41 UTC
Closing out bug report.

Thanks!
Comment 8 Samba QA Contact 2025-10-16 14:37:58 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.6):

bafb6107ef24fc272afc156f52ee7db4e3cea2d3
01deeae7a116e4070c04b49ec5c6535b89597cbc
0d7fb9f3e5b2d8e940f7c88ae9d60c9dbfc4dc31
4cb3c9692c52dfbe8a59c42e9b1a0637ffbaf3b6
353b950083a7a670baecbfab6fc7a97a1cb45979
7973c12234ae6d116cae0d9a3b9e5135b7f36a4d
ad1a318929e957dd7cc237a92ffa167a4cf50777
544e46f1d792e930893ca3b377ecc1f53585662c
Comment 9 Samba QA Contact 2025-11-07 13:23:42 UTC
This bug was referenced in samba v4-23-stable (Release samba-4.23.3):

195499a86fc8d5beb4c453e85a758a069e881581
aee9fcf829724e560ee8571221355045760369f8
2ad0cafc89dd8fa3b34bb6a66d215a518519c26c
2ed0f530269d5fe19c6a216fdf0a584616fecd95
8fb5d5dde4c4a9c7edf36d89b4d7c5bb05be10b4
04d9de203947e45b8791e9b96ceb538a3a2467a5
d5d6d5f5bbeb213d5fea930714523913fc0aa1e6
fda3bc7f2ce2c6105be1e42a14d885912196c7f8
Comment 10 Samba QA Contact 2025-11-18 10:14:03 UTC
This bug was referenced in samba master:

0de67cf0748139920006a4dd65cb77c874c3595f
Comment 11 Ralph Böhme 2025-11-21 10:42:24 UTC
Created attachment 18781 [details]
Followup patch for 4.22 and 4.23 cherry-picked from master
Comment 12 Jule Anger 2025-11-26 08:46:34 UTC
Pushed to autobuild-v4-{23,22}-test.
Comment 13 Samba QA Contact 2025-11-26 11:27:03 UTC
This bug was referenced in samba v4-23-test:

b3f2445aef48e855f689de864d770fc2130f0ecc
Comment 14 Samba QA Contact 2025-11-26 12:52:03 UTC
This bug was referenced in samba v4-22-test:

baca60f9a2239e67fae84da252c62dc060edfbd6
Comment 15 Jule Anger 2025-11-26 13:02:16 UTC
Closing out bug report.

Thanks!
Comment 16 Samba QA Contact 2025-12-12 13:56:49 UTC
This bug was referenced in samba v4-23-stable (Release samba-4.23.4):

b3f2445aef48e855f689de864d770fc2130f0ecc
Comment 17 Samba QA Contact 2025-12-18 16:14:04 UTC
This bug was referenced in samba v4-22-stable (Release samba-4.22.7):

baca60f9a2239e67fae84da252c62dc060edfbd6