When receiving an SMB create request with read-only access mode and open_if disposition, we end of calling the open() function with flags=O_CREAT|O_RDONLY for the ._ AppleDouble file. The file gets created but then we fail to write the AppleDouble header into the file due to the O_RDONLY open mode, leaving a 0 byte size ._ file. Patch to follow...
Oh, checking against macOS SMB server it returns NT_STATUS_OBJECT_NAME_NOT_FOUND for this combination.
(In reply to Ralph Böhme from comment #1) ...for the case that there is no rsrc stream. If there is one, it is just openend.
Ralph, isn't this already fixed?
Hum, I thought so, yes. But briefly checking the code it doesn't look like. Strange...
Created attachment 13147 [details] Patch for 4.5 and 4.6 cherry-picked from master
Comment on attachment 13147 [details] Patch for 4.5 and 4.6 cherry-picked from master LGTM.
Re-assigning to Karolin for inclusion in 4.6.next, 4.5.next.
(In reply to Jeremy Allison from comment #7) Pushed to autobuild-v4-{6,5}-test.
(In reply to Karolin Seeger from comment #8) Pushed to both branches. Closing out bug report. Thanks!
Looks like Apple's SMB server changed behaviour as I can't reproduce this anymore. Opening read-only with open_if dispostion now doesn't return NT_STATUS_OBJECT_NAME_NOT_FOUND anymore but succeeds. Tested against 10.3.6, 10.12.3 and 10.10.4. Go figure...
Re-assigning to Ralph.