diff options
author | Ralph Boehme <slow@samba.org> | 2020-04-30 11:48:32 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-05-05 19:18:40 +0000 |
commit | b74653f2cdc6e6b60df8c78db9dfd50a9723cb19 (patch) | |
tree | 67020642b4f56fd39cfd4d2eb8b51d282118aa2d /source3/smbd/filename.c | |
parent | ab3152bf2273af2cc2aa12322c059ea1b4fb5686 (diff) | |
download | samba-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>
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |