size_t bufsiz)
{
int status;
+ struct smb_filename *full_fname = NULL;
struct smb_filename *clientFname = NULL;
DEBUG(MH_INFO_DEBUG, ("Entering mh_readlinkat\n"));
- if (!is_in_media_files(smb_fname->base_name)) {
+ full_fname = full_path_from_dirfsp_atname(talloc_tos(),
+ dirfsp,
+ smb_fname);
+ if (full_fname == NULL) {
+ status = -1;
+ goto err;
+ }
+
+ if (!is_in_media_files(full_fname->base_name)) {
status = SMB_VFS_NEXT_READLINKAT(handle,
dirfsp,
smb_fname,
}
if ((status = alloc_get_client_smb_fname(handle, talloc_tos(),
- smb_fname,
+ full_fname,
&clientFname))) {
goto err;
}
status = SMB_VFS_NEXT_READLINKAT(handle,
- dirfsp,
+ handle->conn->cwd_fsp,
clientFname,
buf,
bufsiz);
err:
TALLOC_FREE(clientFname);
out:
+ TALLOC_FREE(full_fname);
return status;
}