summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2020-04-30 11:48:32 +0200
committerJeremy Allison <jra@samba.org>2020-05-05 19:18:40 +0000
commitb74653f2cdc6e6b60df8c78db9dfd50a9723cb19 (patch)
tree67020642b4f56fd39cfd4d2eb8b51d282118aa2d
parentab3152bf2273af2cc2aa12322c059ea1b4fb5686 (diff)
downloadsamba-b74653f2cdc6e6b60df8c78db9dfd50a9723cb19.tar.gz
smbd: add twrp arg to synthetic_smb_fname()
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>
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/lib/adouble.c3
-rw-r--r--source3/lib/filename_util.c4
-rw-r--r--source3/modules/vfs_cap.c21
-rw-r--r--source3/modules/vfs_catia.c21
-rw-r--r--source3/modules/vfs_ceph.c2
-rw-r--r--source3/modules/vfs_ceph_snapshots.c4
-rw-r--r--source3/modules/vfs_default.c3
-rw-r--r--source3/modules/vfs_fileid.c1
-rw-r--r--source3/modules/vfs_fruit.c8
-rw-r--r--source3/modules/vfs_glusterfs.c2
-rw-r--r--source3/modules/vfs_gpfs.c1
-rw-r--r--source3/modules/vfs_media_harmony.c1
-rw-r--r--source3/modules/vfs_recycle.c2
-rw-r--r--source3/modules/vfs_shadow_copy.c1
-rw-r--r--source3/modules/vfs_shadow_copy2.c7
-rw-r--r--source3/modules/vfs_snapper.c6
-rw-r--r--source3/modules/vfs_streams_depot.c15
-rw-r--r--source3/modules/vfs_streams_xattr.c4
-rw-r--r--source3/modules/vfs_unityed_media.c1
-rw-r--r--source3/modules/vfs_virusfilter.c3
-rw-r--r--source3/modules/vfs_widelinks.c2
-rw-r--r--source3/modules/vfs_xattr_tdb.c1
-rw-r--r--source3/printing/nt_printing.c1
-rw-r--r--source3/printing/printspoolss.c1
-rw-r--r--source3/rpc_server/eventlog/srv_eventlog_nt.c1
-rw-r--r--source3/rpc_server/fss/srv_fss_agent.c1
-rw-r--r--source3/smbd/close.c3
-rw-r--r--source3/smbd/dir.c1
-rw-r--r--source3/smbd/dosmode.c2
-rw-r--r--source3/smbd/durable.c1
-rw-r--r--source3/smbd/filename.c3
-rw-r--r--source3/smbd/files.c1
-rw-r--r--source3/smbd/msdfs.c6
-rw-r--r--source3/smbd/ntquotas.c1
-rw-r--r--source3/smbd/open.c6
-rw-r--r--source3/smbd/pipes.c1
-rw-r--r--source3/smbd/pysmbd.c2
-rw-r--r--source3/smbd/reply.c4
-rw-r--r--source3/smbd/service.c2
-rw-r--r--source3/smbd/trans2.c6
-rw-r--r--source3/smbd/vfs.c2
-rw-r--r--source3/torture/cmd_vfs.c9
-rw-r--r--source3/utils/net_vfs.c2
44 files changed, 170 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3bd336c1d37..0e96fcccc65 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c
index 84198ab2000..b5b88e2404b 100644
--- a/source3/lib/adouble.c
+++ b/source3/lib/adouble.c
@@ -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;
diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c
index da77862998a..6ab5d26a7ab 100644
--- a/source3/lib/filename_util.c
+++ b/source3/lib/filename_util.c
@@ -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);
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c
index d9c741dd1f8..03f73f5b658 100644
--- a/source3/modules/vfs_cap.c
+++ b/source3/modules/vfs_cap.c
@@ -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);
diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c
index 49e6ec70a40..3f01db0ec14 100644
--- a/source3/modules/vfs_catia.c
+++ b/source3/modules/vfs_catia.c
@@ -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);
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index ef426a0d64f..ed7baba5ba5 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -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;
diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c
index 61672413e5b..17f688353f9 100644
--- a/source3/modules/vfs_ceph_snapshots.c
+++ b/source3/modules/vfs_ceph_snapshots.c
@@ -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;
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index f86bbfe56a2..bfc84e1d20b 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -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);
}
diff --git a/source3/modules/vfs_fileid.c b/source3/modules/vfs_fileid.c
index 4157e1d1b40..3c9cd33f6f2 100644
--- a/source3/modules/vfs_fileid.c
+++ b/source3/modules/vfs_fileid.c
@@ -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");
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index a28ad19fa4e..5579988217a 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -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) {
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 85009b66d7b..90e0491e6ea 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -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);
}
diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 38b740ba800..ae3ee40e147 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -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;
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index f35bf0aaca0..4c5d98f9170 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -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);
diff --git a/source3/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c
index ab1e6aa4dcf..445573d0aa0 100644
--- a/source3/modules/vfs_recycle.c
+++ b/source3/modules/vfs_recycle.c
@@ -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,
diff --git a/source3/modules/vfs_shadow_copy.c b/source3/modules/vfs_shadow_copy.c
index 0241bd7e5e5..c4af04f1ec8 100644
--- a/source3/modules/vfs_shadow_copy.c
+++ b/source3/modules/vfs_shadow_copy.c
@@ -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;
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 2d7fd0064de..a8c904215ea 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -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);
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index 5c56f0aa327..50ea19112ca 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -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) {
diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c
index a5e135b9a50..e408cbdc492 100644
--- a/source3/modules/vfs_streams_depot.c
+++ b/source3/modules/vfs_streams_depot.c
@@ -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;
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
index 85efe2bcc37..6f8d39991c4 100644
--- a/source3/modules/vfs_streams_xattr.c
+++ b/source3/modules/vfs_streams_xattr.c
@@ -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;
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c
index 6fea0aa0581..98c6a9eab95 100644
--- a/source3/modules/vfs_unityed_media.c
+++ b/source3/modules/vfs_unityed_media.c
@@ -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);
diff --git a/source3/modules/vfs_virusfilter.c b/source3/modules/vfs_virusfilter.c
index 0244c04289c..a9a3ac86409 100644
--- a/source3/modules/vfs_virusfilter.c
+++ b/source3/modules/vfs_virusfilter.c
@@ -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;
diff --git a/source3/modules/vfs_widelinks.c b/source3/modules/vfs_widelinks.c
index 02b1f38e0e1..9f5661b84ae 100644
--- a/source3/modules/vfs_widelinks.c
+++ b/source3/modules/vfs_widelinks.c
@@ -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);
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index 65ad33d7b6c..9b772d4f580 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -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);
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index b0bbf08f986..50982e7e1aa 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -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;
diff --git a/source3/printing/printspoolss.c b/source3/printing/printspoolss.c
index 63d11461dff..c1247685831 100644
--- a/source3/printing/printspoolss.c
+++ b/source3/printing/printspoolss.c
@@ -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;
diff --git a/source3/rpc_server/eventlog/srv_eventlog_nt.c b/source3/rpc_server/eventlog/srv_eventlog_nt.c
index 21477b6a666..8e7e3628d44 100644
--- a/source3/rpc_server/eventlog/srv_eventlog_nt.c
+++ b/source3/rpc_server/eventlog/srv_eventlog_nt.c
@@ -102,6 +102,7 @@ static NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx,
fname,
NULL,
NULL,
+ 0,
0);
if (smb_fname == NULL) {
diff --git a/source3/rpc_server/fss/srv_fss_agent.c b/source3/rpc_server/fss/srv_fss_agent.c
index f693aa4afbe..9a15c419ac7 100644
--- a/source3/rpc_server/fss/srv_fss_agent.c
+++ b/source3/rpc_server/fss/srv_fss_agent.c
@@ -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;
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index d0988afcec0..307a7ff4784 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -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;
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 17eeec05577..d6aa45b7997 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -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;
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index a08bb9a55ca..9bb8d1c1941 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -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) {
diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c
index bed48ef0447..de4f457b1d2 100644
--- a/source3/smbd/durable.c
+++ b/source3/smbd/durable.c
@@ -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;
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index a9ccac39956..9de550a730e 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -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);
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index fc84385c113..a700b3edd27 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -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);
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index ddfd7d7c7d9..81e5c6b4908 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -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);
diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c
index 47633b682a8..43714e099fd 100644
--- a/source3/smbd/ntquotas.c
+++ b/source3/smbd/ntquotas.c
@@ -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;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3b73fcbdccd..0dc468e2e54 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -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;
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c
index bc9d926e0ea..2dd38bb7ab3 100644
--- a/source3/smbd/pipes.c
+++ b/source3/smbd/pipes.c
@@ -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);
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index d3a701dcc32..bc93ce7022d 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -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);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 0344668e99f..b29ae9df7c9 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -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);
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 3249c660983..ea99f0d2129 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -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;
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index fc0e513b562..f47d754514f 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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;
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 7c93601d655..346eaf52048 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -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;
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 263f4da2660..52e0e647469 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -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;
diff --git a/source3/utils/net_vfs.c b/source3/utils/net_vfs.c
index a448b9e490f..0585a8d989b 100644
--- a/source3/utils/net_vfs.c
+++ b/source3/utils/net_vfs.c
@@ -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;