]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_syncops: support real dirfsps in syncops_mkdirat()
authorRalph Boehme <slow@samba.org>
Mon, 14 Dec 2020 14:31:37 +0000 (15:31 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 17 Dec 2020 18:56:29 +0000 (18:56 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_syncops.c

index e0dc524bb09fdc051eaad135f8a87789eb8233bb..6fb05e52e30001d7285fc6ccd0ced322dc6fe49c 100644 (file)
@@ -265,12 +265,24 @@ static int syncops_mkdirat(vfs_handle_struct *handle,
                        const struct smb_filename *smb_fname,
                        mode_t mode)
 {
+       struct smb_filename *full_fname = NULL;
+
+       full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+                                                 dirfsp,
+                                                 smb_fname);
+       if (full_fname == NULL) {
+               errno = ENOMEM;
+               return -1;
+       }
+
         SYNCOPS_NEXT_SMB_FNAME(MKDIRAT,
-                       smb_fname,
+                       full_fname,
                                (handle,
                                dirfsp,
                                smb_fname,
                                mode));
+
+       TALLOC_FREE(full_fname);
 }
 
 /* close needs to be handled specially */