vfs_fruit: return ENOENT instead of EISDIR when trying to open AFP_Resource for a...
authorRalph Boehme <slow@samba.org>
Mon, 22 May 2023 17:35:33 +0000 (19:35 +0200)
committerJule Anger <janger@samba.org>
Wed, 31 May 2023 09:47:11 +0000 (09:47 +0000)
Translates to NT_STATUS_OBJECT_NAME_NOT_FOUND which is the same error macOS
returns in this case.

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 9b91a8bad2ff8da9eb56f1f9d640bcea294a5a0a)

source3/modules/vfs_fruit.c

index 4058d4834e72dfe661e6bd20af286e458adf2386..583de93a4b200672340b524b6b7e68302ef873e4 100644 (file)
@@ -1567,7 +1567,7 @@ static int fruit_open_rsrc_adouble(vfs_handle_struct *handle,
            S_ISDIR(fsp->base_fsp->fsp_name->st.st_ex_mode))
        {
                /* sorry, but directories don't have a resource fork */
-               errno = EISDIR;
+               errno = ENOENT;
                rc = -1;
                goto exit;
        }