Bug 13958 - AppleDouble conversion breaks Resourceforks
Summary: AppleDouble conversion breaks Resourceforks
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-21 17:22 UTC by Ralph Böhme
Modified: 2019-06-20 09:49 UTC (History)
2 users (show)

See Also:


Attachments
Patch for 4.9 and 4.10 cherry-picked from master (14.56 KB, patch)
2019-05-27 13:17 UTC, Ralph Böhme
jra: review+
Details
Patch for 4.9 and 4.10 cherry-picked from master (48.06 KB, patch)
2019-06-06 12:19 UTC, Ralph Böhme
jra: review+
gd: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2019-05-21 17:22:12 UTC
This was broken by the change for bug #13642.

The conversion code that unlinks an empty resource fork AppleDouble sidecar file (eg "._file") gets called as part of create_file(..., "file:AFP_AfpResource", ...).

After SMB_VFS_OPEN() has been called with O_CREAT to create the stream, we call
SMB_VFS_FSTAT() on the just created handle. This ends up in ad_convert(), finds the resource fork empty and then deletes the stream.

Have fix, need bugnumber.
Comment 1 Ralph Böhme 2019-05-21 17:27:21 UTC
Note that this only affects installations that set fruit:delete_empty_adfiles = yes which is disabled by default.
Comment 2 Ralph Böhme 2019-05-27 13:17:05 UTC
Created attachment 15195 [details]
Patch for 4.9 and 4.10 cherry-picked from master
Comment 3 Jeremy Allison 2019-05-28 17:42:09 UTC
Comment on attachment 15195 [details]
Patch for 4.9 and 4.10 cherry-picked from master

LGTM.
Comment 4 Jeremy Allison 2019-05-28 17:42:32 UTC
Re-assigning to Karolin for inclusion in 4.10.next, 4.9.next.
Comment 5 Karolin Seeger 2019-06-04 09:46:03 UTC
(In reply to Jeremy Allison from comment #4)
Pushed to autobuild-v4-{10,9}-test.
Comment 6 Ralph Böhme 2019-06-06 12:19:20 UTC
Created attachment 15221 [details]
Patch for 4.9 and 4.10 cherry-picked from master

Previous backport missed one patch from the patchset, sorry!
Comment 7 Guenther Deschner 2019-06-07 09:04:16 UTC
Comment on attachment 15221 [details]
Patch for 4.9 and 4.10 cherry-picked from master

LGTM
Comment 8 Guenther Deschner 2019-06-07 09:04:56 UTC
Karolin, please add to 4.9 and 4.10. Thanks!
Comment 9 Jeremy Allison 2019-06-07 09:14:54 UTC
Comment on attachment 15221 [details]
Patch for 4.9 and 4.10 cherry-picked from master

Sorry I missed it in the review. LGTM. +1.
Comment 10 Karolin Seeger 2019-06-13 08:52:40 UTC
(In reply to Jeremy Allison from comment #9)
Pushed to autobuild-v4-{10,9}-test.
Comment 11 Karolin Seeger 2019-06-20 09:49:30 UTC
(In reply to Karolin Seeger from comment #10)
Pushed to both branches.
Closing out bug report.

Thanks!