]> 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)
committerJeremy Allison <jra@samba.org>
Mon, 1 Jul 2019 21:43:23 +0000 (21:43 +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>
source3/modules/vfs_catia.c

index 5915e40ff28bc155af71d63328a78a4a8c77f2d9..762491ede3141a4151784462def60f6369986e79 100644 (file)
@@ -193,7 +193,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);
@@ -722,7 +722,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);
@@ -760,7 +760,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);
@@ -797,7 +797,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);
@@ -832,7 +832,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);
@@ -867,7 +867,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);
@@ -902,7 +902,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);
@@ -968,7 +968,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);
@@ -1001,7 +1001,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);
@@ -1046,7 +1046,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);
@@ -1126,7 +1126,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);
@@ -1165,7 +1165,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);
@@ -1210,7 +1210,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);
@@ -1253,7 +1253,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);
@@ -1306,7 +1306,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);
@@ -1353,7 +1353,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);
@@ -1406,7 +1406,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);
@@ -1465,7 +1465,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);
@@ -2274,7 +2274,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);
@@ -2367,7 +2367,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);
@@ -2401,7 +2401,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);