smbd: add twrp arg to synthetic_smb_fname()
authorRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 09:48:32 +0000 (11:48 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 5 May 2020 19:18:40 +0000 (19:18 +0000)
Most places take twrp from a local struct smb_filename variable that the
function is working on. Some don't for various reasons:

o synthetic_smb_fname_split() is only called in very few places where we don't
  expect twrp paths

o implementations of SMB_VFS_GETWD(), SMB_VFS_FS_CAPABILITIES() and
  SMB_VFS_REALPATH() return the systems view of cwd and realpath without twrp info

o VFS modules implementing previous-versions support (vfs_ceph_snapshots,
  vfs_shadow_copy2, vfs_snapper) synthesize raw paths that are passed to VFS NEXT
  functions and therefor do not use twrp

o vfs_fruit: macOS doesn't support VSS

o vfs_recycle: in recycle_create_dir() we need a raw OS path to create a directory

o vfs_virusfilter: a few places where we need raw OS paths

o vfs_xattr_tdb: needs a raw OS path for SMB_VFS_NEXT_STAT()

o printing and rpc server: don't support VSS

o vfs_default_durable_reconnect: no Durable Handles on VSS handles, this might
  be enhances in the future. No idea if Windows supports this.

o get_real_filename_full_scan: hm.... FIXME??

o get_original_lcomp: working on a raw path

o msdfs: doesn't support VSS

o vfs_get_ntquota: synthesizes an smb_filename from ".", so doesn't support VSS
  even though VFS modules implement it

o fd_open: conn_rootdir_fname is a raw path

o msg_file_was_renamed: obvious

o open_np_file: pipes don't support VSS

o Python bindings: get's a raw path from the caller

o set_conn_connectpath: raw path

o set_conn_connectpath: raw path

o torture: gets raw paths from the caller

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
44 files changed:
source3/include/proto.h
source3/lib/adouble.c
source3/lib/filename_util.c
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_ceph.c
source3/modules/vfs_ceph_snapshots.c
source3/modules/vfs_default.c
source3/modules/vfs_fileid.c
source3/modules/vfs_fruit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_media_harmony.c
source3/modules/vfs_recycle.c
source3/modules/vfs_shadow_copy.c
source3/modules/vfs_shadow_copy2.c
source3/modules/vfs_snapper.c
source3/modules/vfs_streams_depot.c
source3/modules/vfs_streams_xattr.c
source3/modules/vfs_unityed_media.c
source3/modules/vfs_virusfilter.c
source3/modules/vfs_widelinks.c
source3/modules/vfs_xattr_tdb.c
source3/printing/nt_printing.c
source3/printing/printspoolss.c
source3/rpc_server/eventlog/srv_eventlog_nt.c
source3/rpc_server/fss/srv_fss_agent.c
source3/smbd/close.c
source3/smbd/dir.c
source3/smbd/dosmode.c
source3/smbd/durable.c
source3/smbd/filename.c
source3/smbd/files.c
source3/smbd/msdfs.c
source3/smbd/ntquotas.c
source3/smbd/open.c
source3/smbd/pipes.c
source3/smbd/pysmbd.c
source3/smbd/reply.c
source3/smbd/service.c
source3/smbd/trans2.c
source3/smbd/vfs.c
source3/torture/cmd_vfs.c
source3/utils/net_vfs.c

index 3bd336c1d37b842966da0631a34472e1724108ca..0e96fcccc6593aaeda4995d42379e0546d67cc1c 100644 (file)
@@ -980,6 +980,7 @@ struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
                                         const char *base_name,
                                         const char *stream_name,
                                         const SMB_STRUCT_STAT *psbuf,
+                                        NTTIME twrp,
                                         uint32_t flags);
 struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
                                                const char *fname,
index 84198ab20006b0a9ad6c2cfc961474ee50ad2750..b5b88e2404b070cb2436ed91ec50983fb3c0a80f 100644 (file)
@@ -1095,6 +1095,7 @@ static bool ad_convert_xattr(vfs_handle_struct *handle,
                                                  smb_fname->base_name,
                                                  mapped_name,
                                                  NULL,
+                                                 smb_fname->twrp,
                                                  smb_fname->flags);
                TALLOC_FREE(mapped_name);
                if (stream_name == NULL) {
@@ -1225,6 +1226,7 @@ static bool ad_convert_finderinfo(vfs_handle_struct *handle,
                                          smb_fname->base_name,
                                          AFPINFO_STREAM,
                                          NULL,
+                                         smb_fname->twrp,
                                          smb_fname->flags);
        if (stream_name == NULL) {
                data_blob_free(&aiblob);
@@ -1597,6 +1599,7 @@ static bool ad_collect_one_stream(struct vfs_handle_struct *handle,
                                    smb_fname->base_name,
                                    stream->name,
                                    NULL,
+                                   smb_fname->twrp,
                                    0);
        if (sname == NULL) {
                return false;
index da77862998a180c57e1d98a91cba90d245b84c24..6ab5d26a7abf3a959ebbc08b0282b6c38a72a50e 100644 (file)
@@ -54,6 +54,7 @@ struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
                                         const char *base_name,
                                         const char *stream_name,
                                         const SMB_STRUCT_STAT *psbuf,
+                                        NTTIME twrp,
                                         uint32_t flags)
 {
        struct smb_filename smb_fname_loc = { 0, };
@@ -62,6 +63,7 @@ struct smb_filename *synthetic_smb_fname(TALLOC_CTX *mem_ctx,
        smb_fname_loc.base_name = discard_const_p(char, base_name);
        smb_fname_loc.stream_name = discard_const_p(char, stream_name);
        smb_fname_loc.flags = flags;
+       smb_fname_loc.twrp = twrp;
 
        /* Copy the psbuf if one was given. */
        if (psbuf)
@@ -105,6 +107,7 @@ struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
                                fname,
                                NULL,
                                NULL,
+                               0,
                                SMB_FILENAME_POSIX_PATH);
        }
 
@@ -120,6 +123,7 @@ struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
                                  base_name,
                                  stream_name,
                                  NULL,
+                                 0,
                                  0);
        TALLOC_FREE(base_name);
        TALLOC_FREE(stream_name);
index d9c741dd1f89029dfe68b7c04d12c04a6d3c7ed6..03f73f5b658a85ad5bf74bfa17688801132f884c 100644 (file)
@@ -46,6 +46,7 @@ static uint64_t cap_disk_free(vfs_handle_struct *handle,
                                        capname,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(capname);
@@ -73,6 +74,7 @@ static int cap_get_quota(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -131,6 +133,7 @@ static int cap_mkdirat(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -318,6 +321,7 @@ static int cap_chmod(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -352,6 +356,7 @@ static int cap_lchown(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -385,6 +390,7 @@ static int cap_chdir(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -452,6 +458,7 @@ static int cap_symlinkat(vfs_handle_struct *handle,
                                        capnew,
                                        NULL,
                                        NULL,
+                                       new_smb_fname->twrp,
                                        new_smb_fname->flags);
        if (new_cap_smb_fname == NULL) {
                TALLOC_FREE(capold);
@@ -494,6 +501,7 @@ static int cap_readlinkat(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -538,6 +546,7 @@ static int cap_linkat(vfs_handle_struct *handle,
                                        capold,
                                        NULL,
                                        NULL,
+                                       old_smb_fname->twrp,
                                        old_smb_fname->flags);
        if (old_cap_smb_fname == NULL) {
                TALLOC_FREE(capold);
@@ -549,6 +558,7 @@ static int cap_linkat(vfs_handle_struct *handle,
                                        capnew,
                                        NULL,
                                        NULL,
+                                       new_smb_fname->twrp,
                                        new_smb_fname->flags);
        if (new_cap_smb_fname == NULL) {
                TALLOC_FREE(capold);
@@ -595,6 +605,7 @@ static int cap_mknodat(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -635,6 +646,7 @@ static struct smb_filename *cap_realpath(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -671,6 +683,7 @@ static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -708,6 +721,7 @@ static int cap_sys_acl_set_file(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -743,6 +757,7 @@ static int cap_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -781,6 +796,7 @@ static ssize_t cap_getxattr(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -831,6 +847,7 @@ static ssize_t cap_listxattr(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -867,6 +884,7 @@ static int cap_removexattr(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -919,6 +937,7 @@ static int cap_setxattr(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -968,6 +987,7 @@ static NTSTATUS cap_create_dfs_pathat(vfs_handle_struct *handle,
                                        cappath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
@@ -1001,6 +1021,7 @@ static NTSTATUS cap_read_dfs_pathat(struct vfs_handle_struct *handle,
                                cappath,
                                NULL,
                                NULL,
+                               smb_fname->twrp,
                                smb_fname->flags);
        if (cap_smb_fname == NULL) {
                TALLOC_FREE(cappath);
index 49e6ec70a408c58ece9b65c3ba4ff1cafdb379b6..3f01db0ec1407e5f11717024ad992aaef4fa6eda 100644 (file)
@@ -697,6 +697,7 @@ static int catia_lchown(vfs_handle_struct *handle,
                                        name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(name);
@@ -734,6 +735,7 @@ static int catia_chmod(vfs_handle_struct *handle,
                                        name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(name);
@@ -771,6 +773,7 @@ static int catia_mkdirat(vfs_handle_struct *handle,
                                        name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(name);
@@ -809,6 +812,7 @@ static int catia_chdir(vfs_handle_struct *handle,
                                        name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(name);
@@ -875,6 +879,7 @@ catia_realpath(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -908,6 +913,7 @@ static int catia_chflags(struct vfs_handle_struct *handle,
                                        name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(name);
@@ -953,6 +959,7 @@ catia_streaminfo(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (catia_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1033,6 +1040,7 @@ catia_get_nt_acl(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1072,6 +1080,7 @@ catia_sys_acl_get_file(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1117,6 +1126,7 @@ catia_sys_acl_set_file(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1160,6 +1170,7 @@ catia_sys_acl_delete_def_file(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1213,6 +1224,7 @@ catia_getxattr(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1260,6 +1272,7 @@ catia_listxattr(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1313,6 +1326,7 @@ catia_removexattr(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -1372,6 +1386,7 @@ catia_setxattr(vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -2181,6 +2196,7 @@ static NTSTATUS catia_get_compression(vfs_handle_struct *handle,
                                                mapped_name,
                                                NULL,
                                                &smb_fname->st,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                if (mapped_smb_fname == NULL) {
                        TALLOC_FREE(mapped_name);
@@ -2249,6 +2265,7 @@ static NTSTATUS catia_readdir_attr(struct vfs_handle_struct *handle,
                                        fname,
                                        NULL,
                                        &smb_fname_in->st,
+                                       smb_fname_in->twrp,
                                        0);
 
        status = SMB_VFS_NEXT_READDIR_ATTR(handle, smb_fname, mem_ctx, pattr_data);
@@ -2277,6 +2294,7 @@ static NTSTATUS catia_get_dos_attributes(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -2315,6 +2333,7 @@ static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -2353,6 +2372,7 @@ static NTSTATUS catia_create_dfs_pathat(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
@@ -2393,6 +2413,7 @@ static NTSTATUS catia_read_dfs_pathat(struct vfs_handle_struct *handle,
                                        mapped_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (mapped_smb_fname == NULL) {
                TALLOC_FREE(mapped_name);
index ef426a0d64f1a7d393ebe682ee8b57ebd752c68b..ed7baba5ba5f2fc8283e0d92aaecf16985079338 100644 (file)
@@ -877,6 +877,7 @@ static struct smb_filename *cephwrap_getwd(struct vfs_handle_struct *handle,
                                cwd,
                                NULL,
                                NULL,
+                               0,
                                0);
 }
 
@@ -1122,6 +1123,7 @@ static struct smb_filename *cephwrap_realpath(struct vfs_handle_struct *handle,
                                result,
                                NULL,
                                NULL,
+                               0,
                                0);
        SAFE_FREE(result);
        return result_fname;
index 61672413e5b2f47a3f6da6bb6824f8423d83f996..17f688353f90bd7b42d9668baede91cf90e6c4b2 100644 (file)
@@ -147,6 +147,7 @@ static int ceph_snap_fill_label(struct vfs_handle_struct *handle,
                                        snap_path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                return -ENOMEM;
@@ -413,6 +414,7 @@ static int ceph_snap_get_shadow_copy_data(struct vfs_handle_struct *handle,
                                snaps_path,
                                NULL,
                                NULL,
+                               0,
                                fsp->fsp_name->flags);
        if (snaps_dname == NULL) {
                ret = -ENOMEM;
@@ -562,6 +564,7 @@ static int ceph_snap_gmt_convert_dir(struct vfs_handle_struct *handle,
                                _converted_buf,
                                NULL,
                                NULL,
+                               0,
                                0);     /* XXX check? */
        if (snaps_dname == NULL) {
                ret = -ENOMEM;
@@ -619,6 +622,7 @@ static int ceph_snap_gmt_convert_dir(struct vfs_handle_struct *handle,
                                                _converted_buf,
                                                NULL,
                                                NULL,
+                                               0,
                                                0);
                if (smb_fname == NULL) {
                        ret = -ENOMEM;
index f86bbfe56a2b4b4ed59981ab869a906ce1f719de..bfc84e1d20b5b717a41cda5ad89fce49860a9733 100644 (file)
@@ -135,6 +135,7 @@ static uint32_t vfswrap_fs_capabilities(struct vfs_handle_struct *handle,
                                              conn->connectpath,
                                              NULL,
                                              NULL,
+                                             0,
                                              0);
        if (smb_fname_cpath == NULL) {
                return caps;
@@ -2465,6 +2466,7 @@ static struct smb_filename *vfswrap_getwd(vfs_handle_struct *handle,
                                result,
                                NULL,
                                NULL,
+                               0,
                                0);
        /*
         * sys_getwd() *always* returns malloced memory.
@@ -2931,6 +2933,7 @@ static struct smb_filename *vfswrap_realpath(vfs_handle_struct *handle,
                                                   result,
                                                   NULL,
                                                   NULL,
+                                                  0,
                                                   0);
                SAFE_FREE(result);
        }
index 4157e1d1b4062bafe34b5dd36cca9ace907d42b8..3c9cd33f6f292b4ceb445ecd3d1db030e96f68b1 100644 (file)
@@ -304,6 +304,7 @@ static int get_connectpath_ino(struct vfs_handle_struct *handle,
                                    handle->conn->connectpath,
                                    NULL,
                                    NULL,
+                                   0,
                                    0);
        if (fname == NULL) {
                DBG_ERR("synthetic_smb_fname failed\n");
index a28ad19fa4e3f377e5e0f3366459a4737dc135fe..5579988217a7f22864a30f1c24106b81885ce956 100644 (file)
@@ -884,6 +884,7 @@ static bool readdir_attr_meta_finderi_stream(
                                          smb_fname->base_name,
                                          AFPINFO_STREAM_NAME,
                                          NULL,
+                                         smb_fname->twrp,
                                          smb_fname->flags);
        if (stream_name == NULL) {
                return false;
@@ -1059,6 +1060,7 @@ static uint64_t readdir_attr_rfork_size_stream(
                                          smb_fname->base_name,
                                          AFPRESOURCE_STREAM_NAME,
                                          NULL,
+                                         smb_fname->twrp,
                                          0);
        if (stream_name == NULL) {
                return 0;
@@ -2065,6 +2067,7 @@ static int fruit_unlinkat(vfs_handle_struct *handle,
                                             smb_fname->base_name,
                                             AFPRESOURCE_STREAM_NAME,
                                             NULL,
+                                            smb_fname->twrp,
                                             smb_fname->flags);
        if (rsrc_smb_fname == NULL) {
                return -1;
@@ -3335,6 +3338,7 @@ static NTSTATUS delete_invalid_meta_stream(
                                    smb_fname->base_name,
                                    AFPINFO_STREAM_NAME,
                                    NULL,
+                                   smb_fname->twrp,
                                    0);
        if (sname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -4494,6 +4498,7 @@ static void fruit_offload_write_done(struct tevent_req *subreq)
                        state->src_fsp->fsp_name->base_name,
                        streams[i].name,
                        NULL,
+                       state->src_fsp->fsp_name->twrp,
                        state->src_fsp->fsp_name->flags);
                if (tevent_req_nomem(src_fname_tmp, req)) {
                        return;
@@ -4509,6 +4514,7 @@ static void fruit_offload_write_done(struct tevent_req *subreq)
                        state->dst_fsp->fsp_name->base_name,
                        streams[i].name,
                        NULL,
+                       state->dst_fsp->fsp_name->twrp,
                        state->dst_fsp->fsp_name->flags);
                if (tevent_req_nomem(dst_fname_tmp, req)) {
                        TALLOC_FREE(src_fname_tmp);
@@ -4672,6 +4678,7 @@ static bool fruit_get_bandsize(vfs_handle_struct *handle,
                                        plist,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                ok = false;
@@ -4810,6 +4817,7 @@ static bool fruit_get_num_bands(vfs_handle_struct *handle,
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        TALLOC_FREE(path);
        if (bands_dir == NULL) {
index 85009b66d7b59eaedc2a5b4f0e555afdcc0a1084..90e0491e6eaf24e7b4e6f1133a6959d49c2c1c94 100644 (file)
@@ -1387,6 +1387,7 @@ static struct smb_filename *vfs_gluster_getwd(struct vfs_handle_struct *handle,
                                        ret,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        SAFE_FREE(cwd);
        return smb_fname;
@@ -1527,6 +1528,7 @@ static struct smb_filename *vfs_gluster_realpath(struct vfs_handle_struct *handl
                                                   result,
                                                   NULL,
                                                   NULL,
+                                                  0,
                                                   0);
        }
 
index 38b740ba800ee20e2177c81096c8d8819f907588..ae3ee40e147d5ad6600785ecae7fda094c33d03d 100644 (file)
@@ -1493,6 +1493,7 @@ static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
                                                path,
                                                NULL,
                                                NULL,
+                                               fname->twrp,
                                                0);
        if (fake_fsp.fsp_name == NULL) {
                errno = ENOMEM;
index f35bf0aaca0935902fd9a582c221365c94b4c947..4c5d98f917032bc32b118c33e7c54ef7d1f0c5dc 100644 (file)
@@ -1928,6 +1928,7 @@ static NTSTATUS mh_get_nt_acl(vfs_handle_struct *handle,
                                        clientPath,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (client_smb_fname == NULL) {
                TALLOC_FREE(clientPath);
index ab1e6aa4dcffb00e1b9533a02a8e03788b24742c..445573d0aa088b8bf9d05672e72c053e8ee8f4cc 100644 (file)
@@ -300,6 +300,7 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname)
                                                new_dir,
                                                NULL,
                                                NULL,
+                                               0,
                                                0);
                        if (smb_fname == NULL) {
                                goto done;
@@ -630,6 +631,7 @@ static int recycle_unlink_internal(vfs_handle_struct *handle,
                                        final_name,
                                        smb_fname->stream_name,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_final == NULL) {
                rc = SMB_VFS_NEXT_UNLINKAT(handle,
index 0241bd7e5e54cb45f34acfed41ba247edcc6f152..c4af04f1ec8f64b014dbc455eb35dc74086f5860 100644 (file)
@@ -182,6 +182,7 @@ static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle,
                                                fsp->conn->connectpath,
                                                NULL,
                                                NULL,
+                                               0,
                                                0);
        if (smb_fname == NULL) {
                errno = ENOMEM;
index 2d7fd0064de401a4d75d8dda66d027162d59e478..a8c904215eabbc0ad2bbb89dd05567e841777e8e 100644 (file)
@@ -1553,6 +1553,7 @@ static int shadow_copy2_chdir(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        } else {
                conv_smb_fname = cp_smb_filename(talloc_tos(), smb_fname);
@@ -2013,6 +2014,7 @@ static int shadow_copy2_get_shadow_copy_data(
                                        snapdir,
                                        NULL,
                                        NULL,
+                                       0,
                                        fsp->fsp_name->flags);
        if (snapdir_smb_fname == NULL) {
                errno = ENOMEM;
@@ -2188,6 +2190,7 @@ static NTSTATUS shadow_copy2_get_nt_acl(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2278,6 +2281,7 @@ static ssize_t shadow_copy2_getxattr(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2326,6 +2330,7 @@ static ssize_t shadow_copy2_listxattr(struct vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2644,6 +2649,7 @@ static uint64_t shadow_copy2_disk_free(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2695,6 +2701,7 @@ static int shadow_copy2_get_quota(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
index 5c56f0aa3275c2155bd4de906098ee48cd885f68..50ea19112ca3a60831c2cbde0216062e2cb2b005 100644 (file)
@@ -2244,6 +2244,7 @@ static int snapper_gmt_chdir(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2427,6 +2428,7 @@ static NTSTATUS snapper_gmt_get_nt_acl(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        fname->flags);
        TALLOC_FREE(conv);
        if (smb_fname == NULL) {
@@ -2510,6 +2512,7 @@ static ssize_t snapper_gmt_getxattr(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        TALLOC_FREE(conv);
        if (conv_smb_fname == NULL) {
@@ -2558,6 +2561,7 @@ static ssize_t snapper_gmt_listxattr(struct vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        TALLOC_FREE(conv);
        if (conv_smb_fname == NULL) {
@@ -2690,6 +2694,7 @@ static uint64_t snapper_gmt_disk_free(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        if (conv_smb_fname == NULL) {
                TALLOC_FREE(conv);
@@ -2740,6 +2745,7 @@ static int snapper_gmt_get_quota(vfs_handle_struct *handle,
                                        conv,
                                        NULL,
                                        NULL,
+                                       0,
                                        smb_fname->flags);
        TALLOC_FREE(conv);
        if (conv_smb_fname == NULL) {
index a5e135b9a5066e2c1eab104e04029542be51e7e0..e408cbdc492231c8d9f59bcf54b5801983e3479c 100644 (file)
@@ -155,6 +155,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                        rootdir,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (rootdir_fname == NULL) {
                errno = ENOMEM;
@@ -170,6 +171,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                        smb_fname->base_name,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
                if (smb_fname_base == NULL) {
                        errno = ENOMEM;
@@ -215,6 +217,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                        result,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_hash == NULL) {
                errno = ENOMEM;
@@ -273,6 +276,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                                newname,
                                                NULL,
                                                NULL,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                        TALLOC_FREE(newname);
                        if (smb_fname_new == NULL) {
@@ -319,6 +323,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                        tmp,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (tmp_fname == NULL) {
                errno = ENOMEM;
@@ -347,6 +352,7 @@ static char *stream_dir(vfs_handle_struct *handle,
                                        tmp,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (tmp_fname == NULL) {
                errno = ENOMEM;
@@ -452,6 +458,7 @@ static NTSTATUS stream_smb_fname(vfs_handle_struct *handle,
                                        stream_fname,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (*smb_fname_out == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -499,6 +506,7 @@ static NTSTATUS walk_streams(vfs_handle_struct *handle,
                                        dirname,
                                        NULL,
                                        NULL,
+                                       smb_fname_base->twrp,
                                        smb_fname_base->flags);
        if (dir_smb_fname == NULL) {
                TALLOC_FREE(dirname);
@@ -624,6 +632,7 @@ static int streams_depot_open(vfs_handle_struct *handle,
                                        smb_fname->base_name,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_base == NULL) {
                ret = -1;
@@ -692,6 +701,7 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
                                        smb_fname->base_name,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
@@ -724,6 +734,7 @@ static int streams_depot_unlink_internal(vfs_handle_struct *handle,
                                                dirname,
                                                NULL,
                                                NULL,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                        if (smb_fname_dir == NULL) {
                                TALLOC_FREE(smb_fname_base);
@@ -765,6 +776,7 @@ static int streams_depot_rmdir_internal(vfs_handle_struct *handle,
                                smb_fname->base_name,
                                NULL,
                                NULL,
+                               smb_fname->twrp,
                                smb_fname->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
@@ -797,6 +809,7 @@ static int streams_depot_rmdir_internal(vfs_handle_struct *handle,
                                                dirname,
                                                NULL,
                                                NULL,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                        if (smb_fname_dir == NULL) {
                                TALLOC_FREE(smb_fname_base);
@@ -957,6 +970,7 @@ static bool collect_one_stream(const struct smb_filename *dirfname,
                                        sname,
                                        NULL,
                                        NULL,
+                                       dirfname->twrp,
                                        0);
        if (smb_fname == NULL) {
                state->status = NT_STATUS_NO_MEMORY;
@@ -1004,6 +1018,7 @@ static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle,
                                        smb_fname->base_name,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_base == NULL) {
                return NT_STATUS_NO_MEMORY;
index 85efe2bcc376192f0e9e34f76831b82b7602fa3d..6f8d39991c42dc2d523cf8906aadb206af061a9a 100644 (file)
@@ -219,6 +219,7 @@ static int streams_xattr_fstat(vfs_handle_struct *handle, files_struct *fsp,
                                        io->base,
                                        NULL,
                                        NULL,
+                                       fsp->fsp_name->twrp,
                                        fsp->fsp_name->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
@@ -939,6 +940,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct *handle,
                                        sio->base,
                                        NULL,
                                        NULL,
+                                       fsp->fsp_name->twrp,
                                        fsp->fsp_name->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
@@ -1009,6 +1011,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *handle,
                                        sio->base,
                                        NULL,
                                        NULL,
+                                       fsp->fsp_name->twrp,
                                        fsp->fsp_name->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
@@ -1226,6 +1229,7 @@ static int streams_xattr_ftruncate(struct vfs_handle_struct *handle,
                                        sio->base,
                                        NULL,
                                        NULL,
+                                       fsp->fsp_name->twrp,
                                        fsp->fsp_name->flags);
        if (smb_fname_base == NULL) {
                errno = ENOMEM;
index 6fea0aa05814d4b116147243229f00744a8bda50..98c6a9eab95ebe179e3cd160a26e85f219cdddb5 100644 (file)
@@ -1518,6 +1518,7 @@ static NTSTATUS um_get_nt_acl(vfs_handle_struct *handle,
                                        client_path,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (client_smb_fname == NULL) {
                TALLOC_FREE(client_path);
index 0244c04289c326fa28eaf85bf2fe10796bd7c5bf..a9a3ac86409370a112eb0571cb243336be0e7ce6 100644 (file)
@@ -157,6 +157,7 @@ static bool quarantine_create_dir(
                                                        new_dir,
                                                        NULL,
                                                        NULL,
+                                                       0,
                                                        0);
                        if (smb_fname == NULL) {
                                goto done;
@@ -670,6 +671,7 @@ static virusfilter_action infected_file_action_quarantine(
                                          q_filepath,
                                          smb_fname->stream_name,
                                          NULL,
+                                         0,
                                          smb_fname->flags);
        if (q_smb_fname == NULL) {
                action = VIRUSFILTER_ACTION_DO_NOTHING;
@@ -751,6 +753,7 @@ static virusfilter_action infected_file_action_rename(
 
        q_smb_fname = synthetic_smb_fname(frame, q_filepath,
                                          smb_fname->stream_name, NULL,
+                                         0,
                                          smb_fname->flags);
        if (q_smb_fname == NULL) {
                action = VIRUSFILTER_ACTION_DO_NOTHING;
index 02b1f38e0e1257c32f59642681efc511e554cb92..9f5661b84ae70ce9b17259183161197e53bccdae 100644 (file)
@@ -238,6 +238,7 @@ static struct smb_filename *widelinks_getwd(vfs_handle_struct *handle,
                                config->cwd,
                                NULL,
                                NULL,
+                               0,
                                0);
 }
 
@@ -298,6 +299,7 @@ static struct smb_filename *widelinks_realpath(vfs_handle_struct *handle,
                                resolved_pathname,
                                NULL,
                                NULL,
+                               0,
                                0);
        TALLOC_FREE(pathname);
        TALLOC_FREE(resolved_pathname);
index 65ad33d7b6c13b9cda8e7bd06d7edc9ac6acd0c7..9b772d4f5800712d797c7686ab343b6171aa1f79 100644 (file)
@@ -42,6 +42,7 @@ static int xattr_tdb_get_file_id(struct vfs_handle_struct *handle,
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
index b0bbf08f98685326a7ab9192fa90fcaa894c3bc8..50982e7e1aa8ebc1953e88dcddbc212bf7429de1 100644 (file)
@@ -2033,6 +2033,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
                                        print_dlr_path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                goto err_out;
index 63d11461dffcca1163921e75cdc543dc8e4b3571..c1247685831ee9658a8972e6723047dad5c9e935 100644 (file)
@@ -217,6 +217,7 @@ NTSTATUS print_spool_open(files_struct *fsp,
                                            pf->filename,
                                            NULL,
                                            NULL,
+                                           0,
                                            0);
        if (fsp->fsp_name == NULL) {
                status = NT_STATUS_NO_MEMORY;
index 21477b6a666edeeda3dcfed5f3c770303423bbca..8e7e3628d44a928ba1d7ac0058d71a89995e4369 100644 (file)
@@ -102,6 +102,7 @@ static NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx,
                                                fname,
                                                NULL,
                                                NULL,
+                                               0,
                                                0);
 
        if (smb_fname == NULL) {
index f693aa4afbe11c53909d9ebc87f3dd13a3aa5c1a..9a15c419ac71e6bb75662c949c00b8ec19594034 100644 (file)
@@ -177,6 +177,7 @@ static bool snap_path_exists(TALLOC_CTX *ctx, struct messaging_context *msg_ctx,
                                        sc->sc_path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                goto out;
index d0988afcec0fea55c9da47fb3c7446b0d0967fef..307a7ff4784406a704547eb9639f70b98d8d50d9 100644 (file)
@@ -191,6 +191,7 @@ NTSTATUS delete_all_streams(connection_struct *conn,
                                        smb_fname->base_name,
                                        stream_info[i].name,
                                        NULL,
+                                       smb_fname->twrp,
                                        (smb_fname->flags &
                                                ~SMB_FILENAME_POSIX_PATH));
 
@@ -855,6 +856,7 @@ bool recursive_rmdir(TALLOC_CTX *ctx,
                                                fullname,
                                                NULL,
                                                NULL,
+                                               smb_dname->twrp,
                                                smb_dname->flags);
                if (smb_dname_full == NULL) {
                        errno = ENOMEM;
@@ -1033,6 +1035,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, files_struct *fsp)
                                                        fullname,
                                                        NULL,
                                                        NULL,
+                                                       smb_dname->twrp,
                                                        smb_dname->flags);
                        if (smb_dname_full == NULL) {
                                errno = ENOMEM;
index 17eeec05577eec91f6cf3a0a7c81fa5cad7320ce..d6aa45b7997797a69603c087866031e790ff35e9 100644 (file)
@@ -1258,6 +1258,7 @@ bool is_visible_file(connection_struct *conn,
                                                entry,
                                                NULL,
                                                pst,
+                                               dir_path->twrp,
                                                0);
                if (smb_fname_base == NULL) {
                        ret = false;
index a08bb9a55ca5a1ef2a22c36b4aee53da96669ec9..9bb8d1c1941659b52a52dfc9641fe0e02745ae2e 100644 (file)
@@ -910,6 +910,7 @@ static void dos_mode_at_vfs_get_dosmode_done(struct tevent_req *subreq)
                                       path,
                                       NULL,
                                       &state->smb_fname->st,
+                                      state->smb_fname->twrp,
                                       0);
        if (tevent_req_nomem(smb_path, req)) {
                return;
@@ -1321,6 +1322,7 @@ NTSTATUS set_create_timespec_ea(connection_struct *conn,
                                        psmb_fname->base_name,
                                        NULL,
                                        &psmb_fname->st,
+                                       psmb_fname->twrp,
                                        psmb_fname->flags);
 
        if (smb_fname == NULL) {
index bed48ef0447c6789c1f1a2d59f0eed20dd73f6f6..de4f457b1d2e8f7c354e8916321566e599e8be36 100644 (file)
@@ -587,6 +587,7 @@ NTSTATUS vfs_default_durable_reconnect(struct connection_struct *conn,
                                        cookie.base_name,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
index a9ccac39956c2bfeeb26058dd08ea9a295ed521c..9de550a730e802b57aa75a7be02ec9273af7a129 100644 (file)
@@ -195,6 +195,7 @@ static NTSTATUS check_parent_exists(TALLOC_CTX *ctx,
                                           parent_name,
                                           NULL,
                                           NULL,
+                                          smb_fname->twrp,
                                           smb_fname->flags);
        if (parent_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -1552,6 +1553,7 @@ static int get_real_filename_full_scan(connection_struct *conn,
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                TALLOC_FREE(unmangled_name);
@@ -1776,6 +1778,7 @@ char *get_original_lcomp(TALLOC_CTX *ctx,
                                        filename_in,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
                if (smb_fname == NULL) {
                        TALLOC_FREE(fname);
index fc84385c113548fe3172d8d369c91f3ab753f6e2..a700b3edd271470411f347e9acd6c4b050b22ba4 100644 (file)
@@ -144,6 +144,7 @@ NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
                                            "",
                                            NULL,
                                            NULL,
+                                           0,
                                            0);
        if (fsp->fsp_name == NULL) {
                file_free(NULL, fsp);
index ddfd7d7c7d92811c8055acfe5f6499a804f559e6..81e5c6b4908bb8fb6e1009956863dbb1bfbcbc1d 100644 (file)
@@ -1418,6 +1418,7 @@ bool create_msdfs_link(const struct junction_map *jucn,
                                path,
                                NULL,
                                NULL,
+                               0,
                                0);
        if (smb_fname == NULL) {
                goto out;
@@ -1491,6 +1492,7 @@ bool remove_msdfs_link(const struct junction_map *jucn,
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                TALLOC_FREE(frame);
@@ -1567,6 +1569,7 @@ static size_t count_dfs_links(TALLOC_CTX *ctx,
                                        ".",
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                goto out;
@@ -1586,6 +1589,7 @@ static size_t count_dfs_links(TALLOC_CTX *ctx,
                                        dname,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
                if (smb_dname == NULL) {
                        goto out;
@@ -1702,6 +1706,7 @@ static int form_junctions(TALLOC_CTX *ctx,
                                        ".",
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                goto out;
@@ -1728,6 +1733,7 @@ static int form_junctions(TALLOC_CTX *ctx,
                                dname,
                                NULL,
                                NULL,
+                               0,
                                0);
                if (smb_dname == NULL) {
                        TALLOC_FREE(talloced);
index 47633b682a871cab8f99ff69407bc380baf6c809..43714e099fd960d87880e9d519fd9e79a4441dbd 100644 (file)
@@ -87,6 +87,7 @@ NTSTATUS vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype,
                                ".",
                                NULL,
                                NULL,
+                               0,
                                0);
        if (smb_fname_cwd == NULL) {
                return NT_STATUS_NO_MEMORY;
index 3b73fcbdccd43026f3ddf5e133692e2895fbc964..0dc468e2e5406f64d7254ceb94dbe2c2a6225739 100644 (file)
@@ -628,6 +628,7 @@ static int non_widelink_open(struct connection_struct *conn,
                                                    ".",
                                                    smb_fname->stream_name,
                                                    &smb_fname->st,
+                                                   smb_fname->twrp,
                                                    smb_fname->flags);
                if (smb_fname_rel == NULL) {
                        saved_errno = errno;
@@ -771,6 +772,7 @@ NTSTATUS fd_open(struct connection_struct *conn,
                                        conn_rootdir,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (conn_rootdir_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -948,6 +950,7 @@ static NTSTATUS change_dir_owner_to_parent(connection_struct *conn,
                                            ".",
                                            NULL,
                                            NULL,
+                                           smb_dname->twrp,
                                            0);
        if (smb_fname_cwd == NULL) {
                status = NT_STATUS_NO_MEMORY;
@@ -4689,6 +4692,7 @@ void msg_file_was_renamed(struct messaging_context *msg_ctx,
                                        msg->base_name,
                                        msg->stream_name,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                DBG_DEBUG("synthetic_smb_fname failed\n");
@@ -4790,6 +4794,7 @@ static NTSTATUS open_streams_for_delete(connection_struct *conn,
                                        smb_fname->base_name,
                                        stream_info[i].name,
                                        NULL,
+                                       smb_fname->twrp,
                                        (smb_fname->flags &
                                                ~SMB_FILENAME_POSIX_PATH));
                if (smb_fname_cp == NULL) {
@@ -5521,6 +5526,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
                                                smb_fname->base_name,
                                                NULL,
                                                NULL,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                if (smb_fname_base == NULL) {
                        status = NT_STATUS_NO_MEMORY;
index bc9d926e0ea08bc06a5841d5d2e5d18e0601ddd6..2dd38bb7ab3e0c10f5131b71a7b10431f34ec76f 100644 (file)
@@ -55,6 +55,7 @@ NTSTATUS open_np_file(struct smb_request *smb_req, const char *name,
                                        name,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                file_free(smb_req, fsp);
index d3a701dcc32cb8918d90002843fbc5b7bd1fa579..bc93ce7022de835bb5fec4317fec3772d2ecbc60 100644 (file)
@@ -262,6 +262,7 @@ static NTSTATUS get_nt_acl_conn(TALLOC_CTX *mem_ctx,
                                        fname,
                                        NULL,
                                        NULL,
+                                       0,
                                        lp_posix_pathnames() ?
                                                SMB_FILENAME_POSIX_PATH : 0);
 
@@ -1022,6 +1023,7 @@ static PyObject *py_smbd_mkdir(PyObject *self, PyObject *args, PyObject *kwargs)
                                        fname,
                                        NULL,
                                        NULL,
+                                       0,
                                        lp_posix_pathnames() ?
                                        SMB_FILENAME_POSIX_PATH : 0);
 
index 0344668e99fbcd5e29bf853bdea3650c626112b6..b29ae9df7c9868c770ca9da1221cac49dac7cce4 100644 (file)
@@ -1869,6 +1869,7 @@ void reply_search(struct smb_request *req)
                                        directory,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
                if (smb_dname == NULL) {
                        reply_nterror(req, NT_STATUS_NO_MEMORY);
@@ -3443,6 +3444,7 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
                                        fname_dir,
                                        NULL,
                                        NULL,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
                if (smb_fname_dir == NULL) {
                        status = NT_STATUS_NO_MEMORY;
@@ -8110,6 +8112,7 @@ NTSTATUS rename_internals(TALLOC_CTX *ctx,
                                fname_src_dir,
                                NULL,
                                NULL,
+                               smb_fname_src->twrp,
                                smb_fname_src->flags);
        if (smb_fname_src_dir == NULL) {
                status = NT_STATUS_NO_MEMORY;
@@ -8860,6 +8863,7 @@ void reply_copy(struct smb_request *req)
                                        fname_src_dir,
                                        NULL,
                                        NULL,
+                                       smb_fname_src->twrp,
                                        smb_fname_src->flags);
                if (smb_fname_src_dir == NULL) {
                        reply_nterror(req, NT_STATUS_NO_MEMORY);
index 3249c660983c487fbb1038605118871de0c5deb5..ea99f0d2129d83fc3eb52baa43e7930e92a295ea 100644 (file)
@@ -80,6 +80,7 @@ bool set_conn_connectpath(connection_struct *conn, const char *connectpath)
                                conn->connectpath,
                                NULL,
                                NULL,
+                               0,
                                0);
        if (conn->cwd_fsp->fsp_name == NULL) {
                return false;
@@ -828,6 +829,7 @@ static NTSTATUS make_connection_snum(struct smbXsrv_connection *xconn,
                                        conn->connectpath,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname_cpath == NULL) {
                status = NT_STATUS_NO_MEMORY;
index fc0e513b56294bbf488c917d2bd23bc80296dce7..f47d754514f92f6da2c99ab58f00ff179be2a9cc 100644 (file)
@@ -2636,6 +2636,7 @@ NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
                                           fname,
                                           NULL,
                                           &smb_fname->st,
+                                          smb_fname->twrp,
                                           0);
                if (name == NULL) {
                        TALLOC_FREE(smb_fname);
@@ -6208,6 +6209,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
                                                smb_fname->base_name,
                                                NULL,
                                                NULL,
+                                               smb_fname->twrp,
                                                smb_fname->flags);
                        if (smb_fname_base == NULL) {
                                reply_nterror(req, NT_STATUS_NO_MEMORY);
@@ -6639,6 +6641,7 @@ static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
                                        smb_fname->base_name,
                                        NULL,
                                        &smb_fname->st,
+                                       smb_fname->twrp,
                                        smb_fname->flags);
        if (smb_fname_base == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -7158,6 +7161,7 @@ static NTSTATUS smb2_file_rename_information(connection_struct *conn,
                                        fsp->base_fsp->fsp_name->base_name,
                                        newname,
                                        NULL,
+                                       fsp->base_fsp->fsp_name->twrp,
                                        fsp->base_fsp->fsp_name->flags);
                if (smb_fname_dst == NULL) {
                        status = NT_STATUS_NO_MEMORY;
@@ -7360,6 +7364,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                                        fsp->base_fsp->fsp_name->base_name,
                                        newname,
                                        NULL,
+                                       fsp->base_fsp->fsp_name->twrp,
                                        fsp->base_fsp->fsp_name->flags);
                if (smb_fname_dst == NULL) {
                        status = NT_STATUS_NO_MEMORY;
@@ -7443,6 +7448,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
                                                base_name,
                                                NULL,
                                                NULL,
+                                               smb_fname_src->twrp,
                                                smb_fname_src->flags);
                        if (smb_fname_dst == NULL) {
                                status = NT_STATUS_NO_MEMORY;
index 7c93601d655fc9695ecbbcaa76061a4d0fc97906..346eaf52048a9a411be54b968788761cf2968209 100644 (file)
@@ -927,6 +927,7 @@ struct smb_filename *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn)
                                            ".",
                                            NULL,
                                            NULL,
+                                           0,
                                            0);
        if (smb_fname_dot == NULL) {
                errno = ENOMEM;
@@ -1082,6 +1083,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn,
                                            ".",
                                            NULL,
                                            NULL,
+                                           parent_name->twrp,
                                            0);
        if (smb_fname_cwd == NULL) {
                status = NT_STATUS_NO_MEMORY;
index 263f4da2660e693a78ab7541feeda58e5eb2b71f..52e0e647469569ac9fc8f169baef0bf679636155 100644 (file)
@@ -130,6 +130,7 @@ static NTSTATUS cmd_disk_free(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
        if (smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -158,6 +159,7 @@ static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
        if (smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -250,6 +252,7 @@ static NTSTATUS cmd_mkdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
 
        if (smb_fname == NULL) {
@@ -450,6 +453,7 @@ static NTSTATUS cmd_pathfunc(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int arg
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
 
        if (smb_fname == NULL) {
@@ -905,6 +909,7 @@ static NTSTATUS cmd_chmod(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
        if (smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
@@ -1456,6 +1461,7 @@ static NTSTATUS cmd_removexattr(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
 
        if (smb_fname == NULL) {
@@ -1521,6 +1527,7 @@ static NTSTATUS cmd_get_nt_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
 
        if (smb_fname == NULL) {
@@ -1846,6 +1853,7 @@ static NTSTATUS cmd_sys_acl_delete_def_file(struct vfs_state *vfs, TALLOC_CTX *m
                                        argv[1],
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
 
        if (smb_fname == NULL) {
@@ -1886,6 +1894,7 @@ static NTSTATUS cmd_translate_name(struct vfs_state *vfs, TALLOC_CTX *mem_ctx,
                                        ".",
                                        NULL,
                                        NULL,
+                                       0,
                                        ssf_flags());
        if (smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
index a448b9e490f511e74147df0fea12d2b8455d8da5..0585a8d989b8cdd0d7fb318f5b7704151a30b9bb 100644 (file)
@@ -228,6 +228,7 @@ static int net_vfs_get_ntacl(struct net_context *net,
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                goto done;
@@ -319,6 +320,7 @@ static bool do_unfruit(const char *path)
                                        path,
                                        NULL,
                                        NULL,
+                                       0,
                                        0);
        if (smb_fname == NULL) {
                return false;