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:
const char *base_name,
const char *stream_name,
const SMB_STRUCT_STAT *psbuf,
const char *base_name,
const char *stream_name,
const SMB_STRUCT_STAT *psbuf,
uint32_t flags);
struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
const char *fname,
uint32_t flags);
struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx,
const char *fname,
smb_fname->base_name,
mapped_name,
NULL,
smb_fname->base_name,
mapped_name,
NULL,
smb_fname->flags);
TALLOC_FREE(mapped_name);
if (stream_name == NULL) {
smb_fname->flags);
TALLOC_FREE(mapped_name);
if (stream_name == NULL) {
smb_fname->base_name,
AFPINFO_STREAM,
NULL,
smb_fname->base_name,
AFPINFO_STREAM,
NULL,
smb_fname->flags);
if (stream_name == NULL) {
data_blob_free(&aiblob);
smb_fname->flags);
if (stream_name == NULL) {
data_blob_free(&aiblob);
smb_fname->base_name,
stream->name,
NULL,
smb_fname->base_name,
stream->name,
NULL,
0);
if (sname == NULL) {
return false;
0);
if (sname == NULL) {
return false;
const char *base_name,
const char *stream_name,
const SMB_STRUCT_STAT *psbuf,
const char *base_name,
const char *stream_name,
const SMB_STRUCT_STAT *psbuf,
uint32_t flags)
{
struct smb_filename smb_fname_loc = { 0, };
uint32_t flags)
{
struct smb_filename smb_fname_loc = { 0, };
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.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)
/* Copy the psbuf if one was given. */
if (psbuf)
SMB_FILENAME_POSIX_PATH);
}
SMB_FILENAME_POSIX_PATH);
}
base_name,
stream_name,
NULL,
base_name,
stream_name,
NULL,
0);
TALLOC_FREE(base_name);
TALLOC_FREE(stream_name);
0);
TALLOC_FREE(base_name);
TALLOC_FREE(stream_name);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(capname);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(capname);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
new_smb_fname->flags);
if (new_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
new_smb_fname->flags);
if (new_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
old_smb_fname->flags);
if (old_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
old_smb_fname->flags);
if (old_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
new_smb_fname->flags);
if (new_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
new_smb_fname->flags);
if (new_cap_smb_fname == NULL) {
TALLOC_FREE(capold);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
smb_fname->flags);
if (cap_smb_fname == NULL) {
TALLOC_FREE(cappath);
name,
NULL,
&smb_fname->st,
name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
name,
NULL,
&smb_fname->st,
name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
name,
NULL,
&smb_fname->st,
name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
name,
NULL,
&smb_fname->st,
name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
name,
NULL,
&smb_fname->st,
name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (catia_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
fname,
NULL,
&smb_fname_in->st,
fname,
NULL,
&smb_fname_in->st,
0);
status = SMB_VFS_NEXT_READDIR_ATTR(handle, smb_fname, mem_ctx, pattr_data);
0);
status = SMB_VFS_NEXT_READDIR_ATTR(handle, smb_fname, mem_ctx, pattr_data);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
mapped_name,
NULL,
&smb_fname->st,
mapped_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
smb_fname->flags);
if (mapped_smb_fname == NULL) {
TALLOC_FREE(mapped_name);
0);
SAFE_FREE(result);
return result_fname;
0);
SAFE_FREE(result);
return result_fname;
0);
if (smb_fname == NULL) {
return -ENOMEM;
0);
if (smb_fname == NULL) {
return -ENOMEM;
fsp->fsp_name->flags);
if (snaps_dname == NULL) {
ret = -ENOMEM;
fsp->fsp_name->flags);
if (snaps_dname == NULL) {
ret = -ENOMEM;
_converted_buf,
NULL,
NULL,
_converted_buf,
NULL,
NULL,
0); /* XXX check? */
if (snaps_dname == NULL) {
ret = -ENOMEM;
0); /* XXX check? */
if (snaps_dname == NULL) {
ret = -ENOMEM;
_converted_buf,
NULL,
NULL,
_converted_buf,
NULL,
NULL,
0);
if (smb_fname == NULL) {
ret = -ENOMEM;
0);
if (smb_fname == NULL) {
ret = -ENOMEM;
conn->connectpath,
NULL,
NULL,
conn->connectpath,
NULL,
NULL,
0);
if (smb_fname_cpath == NULL) {
return caps;
0);
if (smb_fname_cpath == NULL) {
return caps;
0);
/*
* sys_getwd() *always* returns malloced memory.
0);
/*
* sys_getwd() *always* returns malloced memory.
handle->conn->connectpath,
NULL,
NULL,
handle->conn->connectpath,
NULL,
NULL,
0);
if (fname == NULL) {
DBG_ERR("synthetic_smb_fname failed\n");
0);
if (fname == NULL) {
DBG_ERR("synthetic_smb_fname failed\n");
smb_fname->base_name,
AFPINFO_STREAM_NAME,
NULL,
smb_fname->base_name,
AFPINFO_STREAM_NAME,
NULL,
smb_fname->flags);
if (stream_name == NULL) {
return false;
smb_fname->flags);
if (stream_name == NULL) {
return false;
smb_fname->base_name,
AFPRESOURCE_STREAM_NAME,
NULL,
smb_fname->base_name,
AFPRESOURCE_STREAM_NAME,
NULL,
0);
if (stream_name == NULL) {
return 0;
0);
if (stream_name == NULL) {
return 0;
smb_fname->base_name,
AFPRESOURCE_STREAM_NAME,
NULL,
smb_fname->base_name,
AFPRESOURCE_STREAM_NAME,
NULL,
smb_fname->flags);
if (rsrc_smb_fname == NULL) {
return -1;
smb_fname->flags);
if (rsrc_smb_fname == NULL) {
return -1;
smb_fname->base_name,
AFPINFO_STREAM_NAME,
NULL,
smb_fname->base_name,
AFPINFO_STREAM_NAME,
NULL,
0);
if (sname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (sname == NULL) {
return NT_STATUS_NO_MEMORY;
state->src_fsp->fsp_name->base_name,
streams[i].name,
NULL,
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;
state->src_fsp->fsp_name->flags);
if (tevent_req_nomem(src_fname_tmp, req)) {
return;
state->dst_fsp->fsp_name->base_name,
streams[i].name,
NULL,
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);
state->dst_fsp->fsp_name->flags);
if (tevent_req_nomem(dst_fname_tmp, req)) {
TALLOC_FREE(src_fname_tmp);
0);
if (smb_fname == NULL) {
ok = false;
0);
if (smb_fname == NULL) {
ok = false;
0);
TALLOC_FREE(path);
if (bands_dir == NULL) {
0);
TALLOC_FREE(path);
if (bands_dir == NULL) {
0);
SAFE_FREE(cwd);
return smb_fname;
0);
SAFE_FREE(cwd);
return smb_fname;
0);
if (fake_fsp.fsp_name == NULL) {
errno = ENOMEM;
0);
if (fake_fsp.fsp_name == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (client_smb_fname == NULL) {
TALLOC_FREE(clientPath);
smb_fname->flags);
if (client_smb_fname == NULL) {
TALLOC_FREE(clientPath);
0);
if (smb_fname == NULL) {
goto done;
0);
if (smb_fname == NULL) {
goto done;
final_name,
smb_fname->stream_name,
NULL,
final_name,
smb_fname->stream_name,
NULL,
smb_fname->flags);
if (smb_fname_final == NULL) {
rc = SMB_VFS_NEXT_UNLINKAT(handle,
smb_fname->flags);
if (smb_fname_final == NULL) {
rc = SMB_VFS_NEXT_UNLINKAT(handle,
fsp->conn->connectpath,
NULL,
NULL,
fsp->conn->connectpath,
NULL,
NULL,
0);
if (smb_fname == NULL) {
errno = ENOMEM;
0);
if (smb_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
} else {
conv_smb_fname = cp_smb_filename(talloc_tos(), smb_fname);
smb_fname->flags);
} else {
conv_smb_fname = cp_smb_filename(talloc_tos(), smb_fname);
fsp->fsp_name->flags);
if (snapdir_smb_fname == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (snapdir_smb_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
fname->flags);
TALLOC_FREE(conv);
if (smb_fname == NULL) {
fname->flags);
TALLOC_FREE(conv);
if (smb_fname == NULL) {
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
if (conv_smb_fname == NULL) {
TALLOC_FREE(conv);
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
TALLOC_FREE(conv);
if (conv_smb_fname == NULL) {
smb_fname->flags);
if (rootdir_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (rootdir_fname == NULL) {
errno = ENOMEM;
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_hash == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_hash == NULL) {
errno = ENOMEM;
smb_fname->flags);
TALLOC_FREE(newname);
if (smb_fname_new == NULL) {
smb_fname->flags);
TALLOC_FREE(newname);
if (smb_fname_new == NULL) {
smb_fname->flags);
if (tmp_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (tmp_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (tmp_fname == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (tmp_fname == NULL) {
errno = ENOMEM;
stream_fname,
NULL,
NULL,
stream_fname,
NULL,
NULL,
smb_fname->flags);
if (*smb_fname_out == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (*smb_fname_out == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname_base->flags);
if (dir_smb_fname == NULL) {
TALLOC_FREE(dirname);
smb_fname_base->flags);
if (dir_smb_fname == NULL) {
TALLOC_FREE(dirname);
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
ret = -1;
smb_fname->flags);
if (smb_fname_base == NULL) {
ret = -1;
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_dir == NULL) {
TALLOC_FREE(smb_fname_base);
smb_fname->flags);
if (smb_fname_dir == NULL) {
TALLOC_FREE(smb_fname_base);
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (smb_fname_dir == NULL) {
TALLOC_FREE(smb_fname_base);
smb_fname->flags);
if (smb_fname_dir == NULL) {
TALLOC_FREE(smb_fname_base);
0);
if (smb_fname == NULL) {
state->status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
state->status = NT_STATUS_NO_MEMORY;
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (smb_fname_base == NULL) {
return NT_STATUS_NO_MEMORY;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
fsp->fsp_name->flags);
if (smb_fname_base == NULL) {
errno = ENOMEM;
smb_fname->flags);
if (client_smb_fname == NULL) {
TALLOC_FREE(client_path);
smb_fname->flags);
if (client_smb_fname == NULL) {
TALLOC_FREE(client_path);
0);
if (smb_fname == NULL) {
goto done;
0);
if (smb_fname == NULL) {
goto done;
q_filepath,
smb_fname->stream_name,
NULL,
q_filepath,
smb_fname->stream_name,
NULL,
smb_fname->flags);
if (q_smb_fname == NULL) {
action = VIRUSFILTER_ACTION_DO_NOTHING;
smb_fname->flags);
if (q_smb_fname == NULL) {
action = VIRUSFILTER_ACTION_DO_NOTHING;
q_smb_fname = synthetic_smb_fname(frame, q_filepath,
smb_fname->stream_name, NULL,
q_smb_fname = synthetic_smb_fname(frame, q_filepath,
smb_fname->stream_name, NULL,
smb_fname->flags);
if (q_smb_fname == NULL) {
action = VIRUSFILTER_ACTION_DO_NOTHING;
smb_fname->flags);
if (q_smb_fname == NULL) {
action = VIRUSFILTER_ACTION_DO_NOTHING;
resolved_pathname,
NULL,
NULL,
resolved_pathname,
NULL,
NULL,
0);
TALLOC_FREE(pathname);
TALLOC_FREE(resolved_pathname);
0);
TALLOC_FREE(pathname);
TALLOC_FREE(resolved_pathname);
0);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
0);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
print_dlr_path,
NULL,
NULL,
print_dlr_path,
NULL,
NULL,
0);
if (smb_fname == NULL) {
goto err_out;
0);
if (smb_fname == NULL) {
goto err_out;
pf->filename,
NULL,
NULL,
pf->filename,
NULL,
NULL,
0);
if (fsp->fsp_name == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (fsp->fsp_name == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
0);
if (smb_fname == NULL) {
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
goto out;
smb_fname->base_name,
stream_info[i].name,
NULL,
smb_fname->base_name,
stream_info[i].name,
NULL,
(smb_fname->flags &
~SMB_FILENAME_POSIX_PATH));
(smb_fname->flags &
~SMB_FILENAME_POSIX_PATH));
smb_dname->flags);
if (smb_dname_full == NULL) {
errno = ENOMEM;
smb_dname->flags);
if (smb_dname_full == NULL) {
errno = ENOMEM;
smb_dname->flags);
if (smb_dname_full == NULL) {
errno = ENOMEM;
smb_dname->flags);
if (smb_dname_full == NULL) {
errno = ENOMEM;
0);
if (smb_fname_base == NULL) {
ret = false;
0);
if (smb_fname_base == NULL) {
ret = false;
path,
NULL,
&state->smb_fname->st,
path,
NULL,
&state->smb_fname->st,
+ state->smb_fname->twrp,
0);
if (tevent_req_nomem(smb_path, req)) {
return;
0);
if (tevent_req_nomem(smb_path, req)) {
return;
psmb_fname->base_name,
NULL,
&psmb_fname->st,
psmb_fname->base_name,
NULL,
&psmb_fname->st,
psmb_fname->flags);
if (smb_fname == NULL) {
psmb_fname->flags);
if (smb_fname == NULL) {
cookie.base_name,
NULL,
NULL,
cookie.base_name,
NULL,
NULL,
0);
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (parent_fname == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (parent_fname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
TALLOC_FREE(unmangled_name);
0);
if (smb_fname == NULL) {
TALLOC_FREE(unmangled_name);
0);
if (smb_fname == NULL) {
TALLOC_FREE(fname);
0);
if (smb_fname == NULL) {
TALLOC_FREE(fname);
0);
if (fsp->fsp_name == NULL) {
file_free(NULL, fsp);
0);
if (fsp->fsp_name == NULL) {
file_free(NULL, fsp);
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
0);
if (smb_fname == NULL) {
TALLOC_FREE(frame);
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_dname == NULL) {
goto out;
0);
if (smb_dname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_fname == NULL) {
goto out;
0);
if (smb_dname == NULL) {
TALLOC_FREE(talloced);
0);
if (smb_dname == NULL) {
TALLOC_FREE(talloced);
0);
if (smb_fname_cwd == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (smb_fname_cwd == NULL) {
return NT_STATUS_NO_MEMORY;
".",
smb_fname->stream_name,
&smb_fname->st,
".",
smb_fname->stream_name,
&smb_fname->st,
smb_fname->flags);
if (smb_fname_rel == NULL) {
saved_errno = errno;
smb_fname->flags);
if (smb_fname_rel == NULL) {
saved_errno = errno;
conn_rootdir,
NULL,
NULL,
conn_rootdir,
NULL,
NULL,
0);
if (conn_rootdir_fname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (conn_rootdir_fname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (smb_fname_cwd == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname_cwd == NULL) {
status = NT_STATUS_NO_MEMORY;
msg->base_name,
msg->stream_name,
NULL,
msg->base_name,
msg->stream_name,
NULL,
0);
if (smb_fname == NULL) {
DBG_DEBUG("synthetic_smb_fname failed\n");
0);
if (smb_fname == NULL) {
DBG_DEBUG("synthetic_smb_fname failed\n");
smb_fname->base_name,
stream_info[i].name,
NULL,
smb_fname->base_name,
stream_info[i].name,
NULL,
(smb_fname->flags &
~SMB_FILENAME_POSIX_PATH));
if (smb_fname_cp == NULL) {
(smb_fname->flags &
~SMB_FILENAME_POSIX_PATH));
if (smb_fname_cp == NULL) {
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
status = NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (smb_fname_base == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
file_free(smb_req, fsp);
0);
if (smb_fname == NULL) {
file_free(smb_req, fsp);
lp_posix_pathnames() ?
SMB_FILENAME_POSIX_PATH : 0);
lp_posix_pathnames() ?
SMB_FILENAME_POSIX_PATH : 0);
lp_posix_pathnames() ?
SMB_FILENAME_POSIX_PATH : 0);
lp_posix_pathnames() ?
SMB_FILENAME_POSIX_PATH : 0);
smb_fname->flags);
if (smb_dname == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
smb_fname->flags);
if (smb_dname == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
smb_fname->flags);
if (smb_fname_dir == NULL) {
status = NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (smb_fname_dir == NULL) {
status = NT_STATUS_NO_MEMORY;
fname_src_dir,
NULL,
NULL,
fname_src_dir,
NULL,
NULL,
smb_fname_src->flags);
if (smb_fname_src_dir == NULL) {
status = NT_STATUS_NO_MEMORY;
smb_fname_src->flags);
if (smb_fname_src_dir == NULL) {
status = NT_STATUS_NO_MEMORY;
fname_src_dir,
NULL,
NULL,
fname_src_dir,
NULL,
NULL,
smb_fname_src->flags);
if (smb_fname_src_dir == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
smb_fname_src->flags);
if (smb_fname_src_dir == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
conn->connectpath,
NULL,
NULL,
conn->connectpath,
NULL,
NULL,
0);
if (conn->cwd_fsp->fsp_name == NULL) {
return false;
0);
if (conn->cwd_fsp->fsp_name == NULL) {
return false;
conn->connectpath,
NULL,
NULL,
conn->connectpath,
NULL,
NULL,
0);
if (smb_fname_cpath == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname_cpath == NULL) {
status = NT_STATUS_NO_MEMORY;
fname,
NULL,
&smb_fname->st,
fname,
NULL,
&smb_fname->st,
0);
if (name == NULL) {
TALLOC_FREE(smb_fname);
0);
if (name == NULL) {
TALLOC_FREE(smb_fname);
smb_fname->base_name,
NULL,
NULL,
smb_fname->base_name,
NULL,
NULL,
smb_fname->flags);
if (smb_fname_base == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
smb_fname->flags);
if (smb_fname_base == NULL) {
reply_nterror(req, NT_STATUS_NO_MEMORY);
smb_fname->base_name,
NULL,
&smb_fname->st,
smb_fname->base_name,
NULL,
&smb_fname->st,
smb_fname->flags);
if (smb_fname_base == NULL) {
return NT_STATUS_NO_MEMORY;
smb_fname->flags);
if (smb_fname_base == NULL) {
return NT_STATUS_NO_MEMORY;
fsp->base_fsp->fsp_name->base_name,
newname,
NULL,
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;
fsp->base_fsp->fsp_name->flags);
if (smb_fname_dst == NULL) {
status = NT_STATUS_NO_MEMORY;
fsp->base_fsp->fsp_name->base_name,
newname,
NULL,
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;
fsp->base_fsp->fsp_name->flags);
if (smb_fname_dst == NULL) {
status = NT_STATUS_NO_MEMORY;
smb_fname_src->flags);
if (smb_fname_dst == NULL) {
status = NT_STATUS_NO_MEMORY;
smb_fname_src->flags);
if (smb_fname_dst == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname_dot == NULL) {
errno = ENOMEM;
0);
if (smb_fname_dot == NULL) {
errno = ENOMEM;
0);
if (smb_fname_cwd == NULL) {
status = NT_STATUS_NO_MEMORY;
0);
if (smb_fname_cwd == NULL) {
status = NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
ssf_flags());
if (smb_fname == NULL) {
return NT_STATUS_NO_MEMORY;
0);
if (smb_fname == NULL) {
goto done;
0);
if (smb_fname == NULL) {
goto done;
0);
if (smb_fname == NULL) {
return false;
0);
if (smb_fname == NULL) {
return false;