]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: use synthetic_pathref() in delete_invalid_meta_stream()
authorRalph Boehme <slow@samba.org>
Thu, 21 Jan 2021 13:37:53 +0000 (14:37 +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 7c7c3cd036f6f4e226a719c878ca3820f40b29bf..c453d74efdee2954546d6487249f59503c0c1ba6 100644 (file)
@@ -3465,6 +3465,7 @@ static NTSTATUS delete_invalid_meta_stream(
        off_t size)
 {
        struct smb_filename *sname = NULL;
+       NTSTATUS status;
        int ret;
        bool ok;
 
@@ -3477,13 +3478,15 @@ static NTSTATUS delete_invalid_meta_stream(
                return NT_STATUS_OK;
        }
 
-       sname = synthetic_smb_fname(talloc_tos(),
-                                   smb_fname->base_name,
-                                   AFPINFO_STREAM_NAME,
-                                   NULL,
-                                   smb_fname->twrp,
-                                   0);
-       if (sname == NULL) {
+       status = synthetic_pathref(talloc_tos(),
+                                  handle->conn->cwd_fsp,
+                                  smb_fname->base_name,
+                                  AFPINFO_STREAM_NAME,
+                                  NULL,
+                                  smb_fname->twrp,
+                                  0,
+                                  &sname);
+       if (!NT_STATUS_IS_OK(status)) {
                return NT_STATUS_NO_MEMORY;
        }