From: Ralph Boehme Date: Thu, 27 Jun 2019 10:50:37 +0000 (+0200) Subject: vfs_catia: pass stat info to synthetic_smb_fname() X-Git-Tag: samba-4.9.12~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97727eefe494d707ec4c652bda4293ccce957da2;p=thirdparty%2Fsamba.git vfs_catia: pass stat info to synthetic_smb_fname() This doesn't cause visible damage in vanilla Samba, but would affect downstream consumers that add additional fields to struct smb_filename. For the same reason there's no test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14015 RN: Ensure vfs_catia passes stat info to stacked VFS modules Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison (cherry picked from commit ae6dd4853e3e651f6e56ce735bcb0a2264857385) --- diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index fce2dcf8ca5..732bf75ffdf 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -180,7 +180,7 @@ static DIR *catia_opendir(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), name_mapped, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_smb_fname); @@ -709,7 +709,7 @@ static int catia_chown(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -747,7 +747,7 @@ static int catia_lchown(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -784,7 +784,7 @@ static int catia_chmod(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -819,7 +819,7 @@ static int catia_rmdir(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -854,7 +854,7 @@ static int catia_mkdir(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -889,7 +889,7 @@ static int catia_chdir(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -955,7 +955,7 @@ catia_realpath(vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -988,7 +988,7 @@ static int catia_chflags(struct vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(name); @@ -1033,7 +1033,7 @@ catia_streaminfo(struct vfs_handle_struct *handle, catia_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (catia_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1113,7 +1113,7 @@ catia_get_nt_acl(struct vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1152,7 +1152,7 @@ catia_sys_acl_get_file(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1197,7 +1197,7 @@ catia_sys_acl_set_file(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1240,7 +1240,7 @@ catia_sys_acl_delete_def_file(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1293,7 +1293,7 @@ catia_getxattr(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1340,7 +1340,7 @@ catia_listxattr(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1393,7 +1393,7 @@ catia_removexattr(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -1452,7 +1452,7 @@ catia_setxattr(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -2261,7 +2261,7 @@ static NTSTATUS catia_get_compression(vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -2354,7 +2354,7 @@ static NTSTATUS catia_get_dos_attributes(struct vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name); @@ -2388,7 +2388,7 @@ static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle, mapped_smb_fname = synthetic_smb_fname(talloc_tos(), mapped_name, NULL, - NULL, + &smb_fname->st, smb_fname->flags); if (mapped_smb_fname == NULL) { TALLOC_FREE(mapped_name);