void *private_data)
{
char *dirname;
+ struct smb_filename *dir_smb_fname = NULL;
DIR *dirhandle = NULL;
const char *dirent = NULL;
char *talloced = NULL;
DEBUG(10, ("walk_streams: dirname=%s\n", dirname));
- dirhandle = SMB_VFS_NEXT_OPENDIR(handle, dirname, NULL, 0);
+ dir_smb_fname = synthetic_smb_fname(talloc_tos(),
+ dirname,
+ NULL,
+ NULL);
+ if (dir_smb_fname == NULL) {
+ TALLOC_FREE(dirname);
+ return NT_STATUS_NO_MEMORY;
+ }
+
+ dirhandle = SMB_VFS_NEXT_OPENDIR(handle, dir_smb_fname, NULL, 0);
+
+ TALLOC_FREE(dir_smb_fname);
if (dirhandle == NULL) {
TALLOC_FREE(dirname);
static NTSTATUS streams_depot_streaminfo(vfs_handle_struct *handle,
struct files_struct *fsp,
- const char *fname,
+ const struct smb_filename *smb_fname,
TALLOC_CTX *mem_ctx,
unsigned int *pnum_streams,
struct stream_struct **pstreams)
{
- struct smb_filename *smb_fname_base;
+ struct smb_filename *smb_fname_base = NULL;
int ret;
NTSTATUS status;
struct streaminfo_state state;
- smb_fname_base = synthetic_smb_fname(talloc_tos(), fname, NULL, NULL);
+ smb_fname_base = synthetic_smb_fname(talloc_tos(),
+ smb_fname->base_name,
+ NULL,
+ NULL);
if (smb_fname_base == NULL) {
return NT_STATUS_NO_MEMORY;
}
*pnum_streams = state.num_streams;
*pstreams = state.streams;
- status = SMB_VFS_NEXT_STREAMINFO(handle, fsp, fname, mem_ctx, pnum_streams, pstreams);
+ status = SMB_VFS_NEXT_STREAMINFO(handle,
+ fsp,
+ smb_fname_base,
+ mem_ctx,
+ pnum_streams,
+ pstreams);
out:
TALLOC_FREE(smb_fname_base);