]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_catia: pass stat info to synthetic_smb_fname()
authorRalph Boehme <slow@samba.org>
Thu, 27 Jun 2019 10:50:37 +0000 (12:50 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Aug 2019 07:32:21 +0000 (07:32 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ae6dd4853e3e651f6e56ce735bcb0a2264857385)

source3/modules/vfs_catia.c

index fce2dcf8ca59d3d943189a39eb48d2f2c0820224..732bf75ffdff079bc81f57335424a8a4af35b145 100644 (file)
@@ -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);