]> git.ipfire.org Git - thirdparty/samba.git/commit
vfs_fruit: never return AFP_Resource stream for directories
authorRalph Boehme <slow@samba.org>
Mon, 22 May 2023 17:37:17 +0000 (19:37 +0200)
committerJule Anger <janger@samba.org>
Wed, 31 May 2023 07:49:14 +0000 (07:49 +0000)
commitb0e8932b1cf94f1f43ac6eca29250a63bea66708
treef2da4fc85c5db544f0be350d6f821af05c01fd0c
parented1979c76c6e75f168049fc9669e6e5250264af3
vfs_fruit: never return AFP_Resource stream for directories

The macOS client creates ._ AppleDouble files for directories that do contain
an (empty) resource fork AppleDouble entry. So when going from a Samba server
config without streams module (or when migrating data from another server
without streams support), to a Samba config with a streams module and vfs_fruit,
fruit_streaminfo() will wrongly return the AFP_Resource from the AppleDouble
file as stream to the client.

To address this, just never return an AFP_Resource stream for directories when
listing streams in fruit_streaminfo(). ad_convert(), when configured with

  fruit:delete_empty_adfiles = true
  fruit:wipe_intentionally_left_blank_rfork = true

will happily discard the AFP_Resource from the AppleDouble file.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15378

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 06f0c070a0b18313f48362aa326e3e7e6a096492)
source3/modules/vfs_fruit.c