vfs_fruit: let fruit_open_rsrc_adouble() return errno = EISDIR
authorStefan Metzmacher <metze@samba.org>
Wed, 30 Dec 2020 12:49:37 +0000 (13:49 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 21 Jan 2021 13:35:33 +0000 (13:35 +0000)
That hopefully makes the check that ':AFP_Resource' can't
be created on directories.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_fruit.c

index b25aebfa9ac79a257919239d141713e1165deaba..34c84b5d0e5a71bf40df3a93cd511e5baeba617e 100644 (file)
@@ -1461,6 +1461,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 habe a resource fork */
+               errno = EISDIR;
                rc = -1;
                goto exit;
        }