]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: support real dirfsps in fruit_unlink_rsrc_adouble()
authorRalph Boehme <slow@samba.org>
Thu, 21 Jan 2021 09:41:41 +0000 (10:41 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 28 Jan 2021 08:11:49 +0000 (08:11 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_fruit.c

index 3ea4b28c0a70f0b05cb505d759c0f964baaaa507..405af5c1efb9ea05e52a10b8272fb41f59cabd16 100644 (file)
@@ -2001,8 +2001,18 @@ static int fruit_unlink_rsrc_adouble(vfs_handle_struct *handle,
        struct smb_filename *adp_smb_fname = NULL;
 
        if (!force_unlink) {
-               ad = ad_get(talloc_tos(), handle, smb_fname,
+               struct smb_filename *full_fname = NULL;
+
+               full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+                                                         dirfsp,
+                                                         smb_fname);
+               if (full_fname == NULL) {
+                       return -1;
+               }
+
+               ad = ad_get(talloc_tos(), handle, full_fname,
                            ADOUBLE_RSRC);
+               TALLOC_FREE(full_fname);
                if (ad == NULL) {
                        errno = ENOENT;
                        return -1;