DEBUG(MH_INFO_DEBUG, ("Entering with smb_fname->base_name '%s'\n",
smb_fname->base_name));
- copystatus = copy_smb_filename(ctx, smb_fname, clientFname);
- if (!NT_STATUS_IS_OK(copystatus))
- {
+ clientFname = cp_smb_filename(ctx, smb_fname);
+ if (clientFname == NULL) {
DEBUG(MH_ERR_DEBUG, ("alloc_get_client_smb_fname "
"NTERR\n"));
- errno = map_errno_from_nt_status(copystatus);
+ errno = ENOMEM;
status = -1;
goto err;
}
DEBUG(MH_INFO_DEBUG, ("Fake stat'ing '%s'\n", statPath));
if (statFn(statPath, &fakeStat,
- lp_fake_dir_create_times(SNUM(handle->conn))))
+ lp_fake_directory_create_times(SNUM(handle->conn))))
{
/* This can fail for legitimate reasons - i.e. the
* fakeStat directory doesn't exist, which is okay
const char *mask,
uint32 attr)
{
- struct mh_dirinfo_struct *dirInfo;
+ struct mh_dirinfo_struct *dirInfo = NULL;
DIR *dirstream;
DEBUG(MH_INFO_DEBUG, ("Entering with fsp->fsp_name->base_name '%s'\n",
uint32_t create_options,
uint32_t file_attributes,
uint32_t oplock_request,
+ struct smb2_lease *lease,
uint64_t allocation_size,
uint32_t private_flags,
struct security_descriptor *sd,
create_options,
file_attributes,
oplock_request,
+ lease,
allocation_size,
private_flags,
sd,
create_options,
file_attributes,
oplock_request,
+ lease,
allocation_size,
private_flags,
sd,
out:
DEBUG(MH_INFO_DEBUG, ("Leaving with fsp->fsp_name->st.st_ex_mtime "
"%s",
- ctime(&(fsp->fsp_name->st.st_ex_mtime.tv_sec))));
+ fsp->fsp_name != NULL ?
+ ctime(&(fsp->fsp_name->st.st_ex_mtime.tv_sec)) :
+ "0"));
return status;
}
* In this case, "name" is a path.
*/
static NTSTATUS mh_get_nt_acl(vfs_handle_struct *handle,
- const char *name,
- uint32 security_info,
- struct security_descriptor **ppdesc)
+ const char *name,
+ uint32 security_info,
+ TALLOC_CTX *mem_ctx,
+ struct security_descriptor **ppdesc)
{
NTSTATUS status;
char *clientPath;
if (!is_in_media_files(name))
{
status = SMB_VFS_NEXT_GET_NT_ACL(handle, name,
- security_info, ppdesc);
+ security_info,
+ mem_ctx, ppdesc);
goto out;
}
}
status = SMB_VFS_NEXT_GET_NT_ACL(handle, clientPath,
- security_info, ppdesc);
+ security_info,
+ mem_ctx, ppdesc);
err:
TALLOC_FREE(clientPath);
out: